Common Network Port Numbers Cheat Sheet (TCP/UDP Ports Every IT Pro Should Know)
Ports tell a device which service a packet is meant for. If you work with firewalls, you use port numbers every day. Bookmark this cheat sheet of the most common ones, with notes on which are secure and which you should avoid.
What Is a Port Number?
An IP address finds the right device, and a port number finds the right service on that device. Ports range from 0 to 65535 and live at the Transport layer (TCP or UDP). See our TCP/IP model guide for background.
Web and Remote Access
| Port | Protocol | Used for | Secure? |
|---|---|---|---|
| 80 | TCP / HTTP | Web traffic | No (unencrypted) |
| 443 | TCP / HTTPS | Secure web traffic | Yes |
| 22 | TCP / SSH | Secure remote login, SFTP | Yes |
| 23 | TCP / Telnet | Remote login | No, avoid |
| 3389 | TCP / RDP | Windows Remote Desktop | Risky if exposed to the internet |
| 8080 | TCP / HTTP-alt | Alternate web, proxies | No (unless TLS added) |
Name, Address, and Time Services
| Port | Protocol | Used for |
|---|---|---|
| 53 | UDP/TCP / DNS | Name resolution |
| 67, 68 | UDP / DHCP | Automatic IP addressing (server 67, client 68) |
| 123 | UDP / NTP | Time synchronization |
| 161, 162 | UDP / SNMP | Network monitoring (traps use 162) |
| 514 | UDP / Syslog | Log forwarding |
DNS, DHCP, and NAT are explained in DNS vs DHCP vs NAT.
| Port | Protocol | Used for | Secure? |
|---|---|---|---|
| 25 | SMTP | Server-to-server mail | Not by default |
| 587 | SMTP submission | Sending mail from clients | Yes (with STARTTLS) |
| 465 | SMTPS | Sending mail over TLS | Yes |
| 110 | POP3 | Receiving mail | No |
| 995 | POP3S | Receiving mail over TLS | Yes |
| 143 | IMAP | Receiving mail | No |
| 993 | IMAPS | Receiving mail over TLS | Yes |
File Transfer and Directory
| Port | Protocol | Used for | Secure? |
|---|---|---|---|
| 20, 21 | FTP | File transfer (data, control) | No |
| 69 | UDP / TFTP | Simple file transfer, device configs | No |
| 445 | SMB | Windows file sharing | Never expose to the internet |
| 389 | LDAP | Directory services | No |
| 636 | LDAPS | Directory services over TLS | Yes |
Databases
| Port | Service |
|---|---|
| 1433 | Microsoft SQL Server |
| 3306 | MySQL / MariaDB |
| 5432 | PostgreSQL |
Databases should almost never be reachable directly from the internet.
Port Ranges
- 0 to 1023: well-known ports
- 1024 to 49151: registered ports
- 49152 to 65535: dynamic or ephemeral ports (used by clients)
Security Tips
- Close every port you do not need.
- Prefer encrypted versions (HTTPS, SSH, IMAPS, LDAPS).
- Never expose RDP, SMB, or database ports directly to the internet.
- Use firewall policies that allow only the needed ports. Read What Is a Firewall?
- On your own network, check open ports with Nmap.
Frequently Asked Questions
Does changing a port make a service secure? No. It may reduce noise from automated scans, but it is not real security. Use strong authentication and access controls.
TCP or UDP? TCP is for reliable delivery, and UDP is for speed. Some services, like DNS, use both.
Conclusion
You do not need to memorize every port, but knowing the common ones makes firewall rules and troubleshooting much faster. Print this cheat sheet or bookmark it for your next lab or exam.
Join the conversation