SaveMyCert
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

Remote access and files: port numbers
PortTransportServiceWhat to know
20, 21TCPFTP (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).
22TCPSSH, SCP and SFTPEncrypted remote shell; SCP and SFTP copy files over the same SSH connection.
23TCPTelnetUnencrypted remote terminal. Disable it on network devices. Secure alternative: SSH (22).
69UDPTFTP (Trivial File Transfer Protocol)No authentication; used to copy device images and configurations on a trusted network.
445TCPSMB (Server Message Block)Windows file and printer sharing; should never be reachable from the internet.
137–139TCP/UDPNetBIOS137 UDP name service, 138 UDP datagrams, 139 TCP sessions. Legacy Windows networking.
3389TCP/UDPRDP (Remote Desktop Protocol)Windows remote desktop. A frequent attack target when exposed directly to the internet.
5900TCPVNC (Virtual Network Computing)Remote desktop sharing; add a display number for each additional screen (5901, 5902 …).

Web and email

Web and email: port numbers
PortTransportServiceWhat to know
80TCPHTTPUnencrypted web traffic. Secure alternative: HTTPS (443).
443TCP/UDPHTTPS (HTTP over TLS)Encrypted web traffic; UDP 443 carries HTTP/3 over QUIC.
25TCPSMTP (Simple Mail Transfer Protocol)Server-to-server mail relay. Secure alternative: SMTP with STARTTLS on 587, or implicit TLS on 465.
587TCPSMTP submissionMail clients submit outgoing mail here, upgrading to TLS with STARTTLS.
110TCPPOP3 (Post Office Protocol 3)Downloads mail from the server, in clear text. Secure alternative: POP3S (995).
995TCPPOP3S (POP3 over TLS)POP3 with implicit TLS.
143TCPIMAP (Internet Message Access Protocol)Keeps mail on the server and syncs it, in clear text. Secure alternative: IMAPS (993).
993TCPIMAPS (IMAP over TLS)IMAP with implicit TLS.

Network services

Network services: port numbers
PortTransportServiceWhat to know
53TCP/UDPDNSUDP for most queries; TCP for zone transfers and large responses.
67, 68UDPDHCPServers listen on 67, clients on 68. Relay agents forward client broadcasts to 67.
123UDPNTP (Network Time Protocol)Time synchronisation; accurate time underpins logs, Kerberos and certificates.
500UDPIKE / ISAKMP (IPsec key exchange)Negotiates IPsec security associations for VPNs.
4500UDPIPsec NAT traversalWraps IPsec in UDP so it can pass through NAT.
1985UDPHSRP (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

Directory and authentication: port numbers
PortTransportServiceWhat to know
389TCP/UDPLDAPDirectory queries, for example to Active Directory, in clear text unless upgraded with StartTLS. Secure alternative: LDAPS (636).
636TCPLDAPS (LDAP over TLS)LDAP with implicit TLS.
88TCP/UDPKerberosTicket-based authentication used by Active Directory.
1812, 1813UDPRADIUS1812 for authentication, 1813 for accounting. Used for network access and 802.1X.
49TCPTACACS+Cisco device administration AAA; encrypts the whole payload and separates authorisation.

Management and monitoring

Management and monitoring: port numbers
PortTransportServiceWhat to know
161, 162UDPSNMPManagers poll agents on 161; agents send traps and informs to 162. Use SNMPv3 for authentication and encryption.
514UDPSyslogLog messages to a collector, unencrypted. Secure alternative: Syslog over TLS (6514).
6514TCPSyslog over TLSEncrypted, reliable delivery of syslog messages.

Databases and voice

Databases and voice: port numbers
PortTransportServiceWhat to know
1433TCPMicrosoft SQL ServerDefault SQL Server port; database ports should not face the internet.
3306TCPMySQLDefault MySQL and MariaDB port.
5060, 5061TCP/UDPSIP (Session Initiation Protocol)5060 for unencrypted signalling, 5061 for SIP over TLS. Sets up VoIP calls.

Where ports come up

Port numbers: your questions

The core set is FTP 20/21, SSH 22, Telnet 23, SMTP 25, DNS 53, DHCP 67/68, HTTP 80, Kerberos 88, POP3 110, NTP 123, IMAP 143, SNMP 161/162, LDAP 389, HTTPS 443, SMB 445, Syslog 514, LDAPS 636, IMAPS 993, POP3S 995, RADIUS 1812/1813 and RDP 3389.