Network Ports Cheat Sheet
Common TCP/UDP port numbers, port ranges, and how to check open ports and services.
Web & Network
ports
network
tcp
Ports identify specific services on a host. A port plus an IP address forms a socket; the transport protocol (TCP or UDP) determines delivery semantics. Knowing common ports speeds up debugging and firewall rules.
Well-known ports
Table
| Port | Protocol | Service |
|---|---|---|
| 20/21 | TCP | FTP |
| 22 | TCP | SSH |
| 23 | TCP | Telnet |
| 25 | TCP | SMTP |
| 53 | TCP/UDP | DNS |
| 80 | TCP | HTTP |
| 110 | TCP | POP3 |
| 143 | TCP | IMAP |
| 443 | TCP | HTTPS |
| 3306 | TCP | MySQL |
| 5432 | TCP | PostgreSQL |
| 6379 | TCP | Redis |
| 27017 | TCP | MongoDB |
Port ranges
Table
| Range | Name |
|---|---|
| 0–1023 | Well-known (system) ports. |
| 1024–49151 | Registered ports. |
| 49152–65535 | Dynamic/private (ephemeral) ports. |
Checking open ports
bash
ss -tulpn # listening sockets (Linux)
netstat -an # all connections
lsof -i :443 # process using a port
nmap -p 80,443 host # scan specific ports
nc -zv host 443 # test connectivity
Table
| Command | Purpose |
|---|---|
ss -tulpn | List listening TCP/UDP ports with processes. |
lsof -i :PORT | Find the process on a port. |
nc -zv host port | Check if a port is reachable. |
nmap -p | Scan a range of ports. |