Ports and protocols cheat sheet

The 48 ports most worth knowing for the CompTIA® Security+® (SY0-801) exam, with what each one carries and the secure alternative where there is one.

Port numbers and transports are checked against the IANA Service Name and Transport Protocol Port Number Registry. The notes are our own summaries. The Gapwise app drills these with spaced repetition.

Ports by number
PortTransportServiceWhat to know
20TCPFTP dataFile Transfer Protocol data channel; cleartext. Prefer SFTP or FTPS.
21TCPFTP controlFile Transfer Protocol commands and logins in cleartext. Prefer SFTP or FTPS.
22TCPSSHEncrypted remote shell; also carries SFTP and SCP file transfers.
23TCPTelnetCleartext remote terminal. Replace with SSH.
25TCPSMTPMail transfer between servers.
49TCPTACACS+Device administration AAA (commonly TACACS+ over TCP 49).
53UDPDNSName resolution queries (UDP; TCP for large responses and zone transfers).
53TCPDNS over TCPZone transfers and responses too large for UDP.
67UDPDHCP serverDHCP/BOOTP server side.
68UDPDHCP clientDHCP/BOOTP client side.
69UDPTFTPTrivial File Transfer: no authentication; used for network boot and device configs.
80TCPHTTPWeb traffic in cleartext.
88TCPKerberosTicket-based network authentication (Active Directory).
110TCPPOP3Mailbox retrieval in cleartext. Prefer POP3S (995).
123UDPNTPTime synchronization; accurate time matters for logs and Kerberos.
137UDPNetBIOS name serviceLegacy Windows name service; block at the perimeter.
139TCPNetBIOS sessionLegacy SMB over NetBIOS; block at the perimeter.
143TCPIMAPMailbox access in cleartext. Prefer IMAPS (993).
161UDPSNMPDevice monitoring queries; use SNMPv3 for authentication and encryption.
162UDPSNMP trapsUnsolicited alerts from devices to the manager.
389TCPLDAPDirectory queries; cleartext unless protected with StartTLS.
443TCPHTTPSHTTP over TLS.
445TCPSMBWindows file sharing (SMB directly over TCP); never expose to the internet.
465TCPSMTP submission over TLSMail submission with implicit TLS.
500UDPIKEIPsec key exchange (ISAKMP/IKE).
514UDPSyslogTraditional syslog over UDP; unauthenticated and unencrypted.
587TCPSMTP submissionMail submission from clients, usually upgraded with STARTTLS.
636TCPLDAPSLDAP over TLS.
853TCPDNS over TLSEncrypted DNS (DoT).
989TCPFTPS dataFTP over TLS, data channel (implicit TLS).
990TCPFTPS controlFTP over TLS, control channel (implicit TLS).
993TCPIMAPSIMAP over TLS.
995TCPPOP3SPOP3 over TLS.
1433TCPMicrosoft SQL ServerDatabase listener; keep off the internet.
1701UDPL2TPLayer 2 Tunneling Protocol; usually paired with IPsec for encryption.
1723TCPPPTPLegacy VPN with known cryptographic weaknesses; avoid.
1812UDPRADIUS authenticationAAA for network access, often behind 802.1X.
1813UDPRADIUS accountingAccounting records for RADIUS sessions.
3306TCPMySQLDatabase listener; keep off the internet.
3389TCPRDPRemote Desktop Protocol; restrict to VPN or a jump host.
4500UDPIPsec NAT traversalIKE and ESP encapsulated in UDP to cross NAT.
4739UDPIPFIXIP Flow Information Export collectors.
5060UDPSIPVoIP call signaling in cleartext.
5061TCPSIP over TLSVoIP signaling protected with TLS.
5432TCPPostgreSQLDatabase listener; keep off the internet.
5900TCPVNCRemote Framebuffer protocol used by VNC remote desktop.
6514TCPSyslog over TLSEncrypted, reliable syslog transport.
8080TCPHTTP alternateCommon alternate port for web proxies and admin consoles.

How to remember them

  • Learn the pairs: a cleartext protocol and its secure version (HTTP 80 and HTTPS 443, LDAP 389 and LDAPS 636, IMAP 143 and IMAPS 993, POP3 110 and POP3S 995).
  • Group by job: remote access, email, name and time services, directory and authentication, file transfer, databases.
  • Questions often hide the port inside a firewall rule or a log line, so practice reading the number in context.