Networking and security reference
Common port numbers cheat sheet
The TCP and UDP ports security and networking exams expect you to recognise, grouped by what they do: remote access, web and email, network services, directory and authentication, management, and databases. Each clear-text protocol lists its secure alternative. Test yourself with the quiz, then use the tables to fill the gaps.
Ten quick questions: a service to match to its port, or a port to match to its service.
Remote access and files
| Port | Transport | Service | What to know |
|---|---|---|---|
| 20, 21 | TCP | FTP (File Transfer Protocol) | 21 carries control commands, 20 carries data in active mode. Sends credentials in clear text. Secure alternative: SFTP (22) or FTPS (990). |
| 22 | TCP | SSH, SCP and SFTP | Encrypted remote shell; SCP and SFTP copy files over the same SSH connection. |
| 23 | TCP | Telnet | Unencrypted remote terminal. Disable it on network devices. Secure alternative: SSH (22). |
| 69 | UDP | TFTP (Trivial File Transfer Protocol) | No authentication; used to copy device images and configurations on a trusted network. |
| 445 | TCP | SMB (Server Message Block) | Windows file and printer sharing; should never be reachable from the internet. |
| 137–139 | TCP/UDP | NetBIOS | 137 UDP name service, 138 UDP datagrams, 139 TCP sessions. Legacy Windows networking. |
| 3389 | TCP/UDP | RDP (Remote Desktop Protocol) | Windows remote desktop. A frequent attack target when exposed directly to the internet. |
| 5900 | TCP | VNC (Virtual Network Computing) | Remote desktop sharing; add a display number for each additional screen (5901, 5902 …). |
Web and email
| Port | Transport | Service | What to know |
|---|---|---|---|
| 80 | TCP | HTTP | Unencrypted web traffic. Secure alternative: HTTPS (443). |
| 443 | TCP/UDP | HTTPS (HTTP over TLS) | Encrypted web traffic; UDP 443 carries HTTP/3 over QUIC. |
| 25 | TCP | SMTP (Simple Mail Transfer Protocol) | Server-to-server mail relay. Secure alternative: SMTP with STARTTLS on 587, or implicit TLS on 465. |
| 587 | TCP | SMTP submission | Mail clients submit outgoing mail here, upgrading to TLS with STARTTLS. |
| 110 | TCP | POP3 (Post Office Protocol 3) | Downloads mail from the server, in clear text. Secure alternative: POP3S (995). |
| 995 | TCP | POP3S (POP3 over TLS) | POP3 with implicit TLS. |
| 143 | TCP | IMAP (Internet Message Access Protocol) | Keeps mail on the server and syncs it, in clear text. Secure alternative: IMAPS (993). |
| 993 | TCP | IMAPS (IMAP over TLS) | IMAP with implicit TLS. |
Network services
| Port | Transport | Service | What to know |
|---|---|---|---|
| 53 | TCP/UDP | DNS | UDP for most queries; TCP for zone transfers and large responses. |
| 67, 68 | UDP | DHCP | Servers listen on 67, clients on 68. Relay agents forward client broadcasts to 67. |
| 123 | UDP | NTP (Network Time Protocol) | Time synchronisation; accurate time underpins logs, Kerberos and certificates. |
| 500 | UDP | IKE / ISAKMP (IPsec key exchange) | Negotiates IPsec security associations for VPNs. |
| 4500 | UDP | IPsec NAT traversal | Wraps IPsec in UDP so it can pass through NAT. |
| 1985 | UDP | HSRP (Hot Standby Router Protocol) | Cisco first-hop redundancy hellos (version 1 to 224.0.0.2, version 2 to 224.0.0.102). |
Directory and authentication
| Port | Transport | Service | What to know |
|---|---|---|---|
| 389 | TCP/UDP | LDAP | Directory queries, for example to Active Directory, in clear text unless upgraded with StartTLS. Secure alternative: LDAPS (636). |
| 636 | TCP | LDAPS (LDAP over TLS) | LDAP with implicit TLS. |
| 88 | TCP/UDP | Kerberos | Ticket-based authentication used by Active Directory. |
| 1812, 1813 | UDP | RADIUS | 1812 for authentication, 1813 for accounting. Used for network access and 802.1X. |
| 49 | TCP | TACACS+ | Cisco device administration AAA; encrypts the whole payload and separates authorisation. |
Management and monitoring
| Port | Transport | Service | What to know |
|---|---|---|---|
| 161, 162 | UDP | SNMP | Managers poll agents on 161; agents send traps and informs to 162. Use SNMPv3 for authentication and encryption. |
| 514 | UDP | Syslog | Log messages to a collector, unencrypted. Secure alternative: Syslog over TLS (6514). |
| 6514 | TCP | Syslog over TLS | Encrypted, reliable delivery of syslog messages. |
Databases and voice
| Port | Transport | Service | What to know |
|---|---|---|---|
| 1433 | TCP | Microsoft SQL Server | Default SQL Server port; database ports should not face the internet. |
| 3306 | TCP | MySQL | Default MySQL and MariaDB port. |
| 5060, 5061 | TCP/UDP | SIP (Session Initiation Protocol) | 5060 for unencrypted signalling, 5061 for SIP over TLS. Sets up VoIP calls. |