Course · $400 Free reference Certifications

Common network ports, one cheat sheet

The TCP/UDP port numbers every Network+ and Security+ exam expects you to know cold — service, port, and protocol.

Advertisement · 728×90

The ports you must know

PortProtocolService
20 / 21TCPFTP — file transfer (20 data, 21 control)
22TCPSSH / SCP / SFTP — secure shell & transfer
23TCPTelnet — unencrypted remote login
25TCPSMTP — sending email
53TCP/UDPDNS — name resolution
67 / 68UDPDHCP — IP assignment (67 server, 68 client)
69UDPTFTP — trivial file transfer
80TCPHTTP — web
110TCPPOP3 — receiving email
123UDPNTP — time sync
143TCPIMAP — email with server-side folders
161 / 162UDPSNMP — network management (162 traps)
389TCP/UDPLDAP — directory services
443TCPHTTPS — web over TLS
445TCPSMB — Windows file sharing
636TCPLDAPS — LDAP over TLS
993 / 995TCPIMAPS / POP3S — secure email
3389TCPRDP — Windows remote desktop
3306 / 5432TCPMySQL / PostgreSQL databases

Plaintext vs secure pairs

Pattern worth memorizing

Many services have a plaintext port and a TLS-secured sibling: HTTP 80 → HTTPS 443, IMAP 143 → IMAPS 993, POP3 110 → POP3S 995, LDAP 389 → LDAPS 636. Prefer the secure port in production.

The three port ranges

  • Well-known: 0–1023 (the services above).
  • Registered: 1024–49151 (vendor apps, e.g. 3306, 3389).
  • Dynamic / ephemeral: 49152–65535 (temporary client-side ports).

Test yourself

4 quick questions — tap an answer to check it instantly. Nothing is sent anywhere.

1. Which port does SSH use?

Answer: B. SSH (and SFTP/SCP) use TCP port 22. Port 23 is Telnet (unencrypted).

2. DNS primarily uses which port?

Answer: A. DNS uses port 53 — UDP for most queries, TCP for zone transfers and large responses.

3. Which is the secure version of IMAP?

Answer: C. IMAPS is port 993. 143 is plain IMAP; 995 is POP3S.

4. RDP (Windows Remote Desktop) uses which port?

Answer: B. RDP uses TCP 3389. 3306 is MySQL, 5432 is PostgreSQL.

Sources

  1. IANA — Service Name and Transport Protocol Port Number Registry.
  2. CompTIA Network+ / Security+ exam objectives.

Reference summary only. Authoritative assignments are in the IANA Service Name and Transport Protocol Port Number Registry.