Port Numbers to Know for the A+, Network+, and Security+ Exams

Port numbers are one of the few things on a CompTIA exam that reward flat memorization. There is no reasoning your way to the fact that LDAP is 389. You either know it or you lose the point — and ports show up on the A+, Network+, and Security+ exams, sometimes several times each.

The good news is that the list is short and there is a structure hiding inside it.

Learn the insecure and secure pairs together. Most of the list is one protocol appearing twice — once in the clear, once wrapped in TLS.

The Ports You Must Know

PortProtocolTCP/UDPWhat it does
20, 21FTPTCPFile transfer — 20 is data, 21 is control. Unencrypted.
22SSH, SCP, SFTPTCPEncrypted remote administration and file transfer.
23TelnetTCPRemote administration in cleartext. Legacy; know it as the insecure counterpart to SSH.
25SMTPTCPSending mail between servers.
49TACACS+TCPAAA service, Cisco-oriented. Encrypts the entire payload.
53DNSUDP and TCPName resolution. UDP for queries, TCP for zone transfers and large responses.
67, 68DHCPUDPAutomatic IP addressing — 67 server, 68 client.
69TFTPUDPTrivial file transfer, no authentication. Common for network device configs.
80HTTPTCPWeb traffic, unencrypted.
88KerberosTCP and UDPAuthentication in Active Directory environments.
110POP3TCPRetrieving mail, typically downloading and removing it from the server.
123NTPUDPTime synchronization. Matters more than it sounds — Kerberos breaks when clocks drift.
137, 138, 139NetBIOSTCP and UDPLegacy Windows name service and session support.
143IMAPTCPRetrieving mail while leaving it synchronized on the server.
161, 162SNMPUDPNetwork device monitoring — 161 for queries, 162 for traps.
389LDAPTCP and UDPDirectory services lookups, unencrypted.
443HTTPSTCPWeb traffic over TLS.
445SMB/CIFSTCPWindows file and printer sharing. Heavily targeted; should never be exposed to the internet.
465, 587SMTP secure / submissionTCPEncrypted mail submission. 587 with STARTTLS is the modern default.
500ISAKMP / IKEUDPKey exchange for IPsec VPNs.
514SyslogUDPCentralized log collection.
636LDAPSTCPLDAP over TLS.
993IMAPSTCPIMAP over TLS.
995POP3STCPPOP3 over TLS.
1433Microsoft SQL ServerTCPDatabase traffic.
1521OracleTCPDatabase traffic.
1812, 1813RADIUSUDPAAA — 1812 authentication, 1813 accounting. Encrypts only the password.
3306MySQLTCPDatabase traffic.
3389RDPTCPRemote Desktop. Along with 22 and 445, one of the most attacked ports on the internet.
5060, 5061SIPTCP and UDPVoice over IP session setup — 5061 is the TLS version.
5432PostgreSQLTCPDatabase traffic.
5900VNCTCPCross-platform remote desktop.
8080HTTP alternateTCPProxies, web admin consoles, and development servers.

Learn Them in Pairs

This is the single most useful trick for this material. A large share of the list is the same protocol twice, and exam questions love asking you to swap an insecure service for its secure equivalent.

  • HTTP 80 → HTTPS 443
  • FTP 21 → FTPS 990, or better, SFTP over SSH 22
  • Telnet 23 → SSH 22
  • LDAP 389 → LDAPS 636
  • IMAP 143 → IMAPS 993
  • POP3 110 → POP3S 995
  • SMTP 25 → SMTP with STARTTLS 587
  • SIP 5060 → SIP-TLS 5061

Notice how often the secure version is simply a higher number in the 600–1000 range. That pattern will not carry you through every question, but it is a useful sanity check when two answers look plausible.

Port Ranges

Exams ask about the ranges themselves, not just individual ports.

  • 0–1023: well-known ports. Assigned by IANA to standard services. On Unix-like systems, binding to these requires elevated privilege.
  • 1024–49151: registered ports. Assigned to specific vendor applications — 1433, 3306, 3389 and similar live here.
  • 49152–65535: dynamic, private, or ephemeral ports. Assigned temporarily to the client side of a connection. This is the range that matters when you write stateless firewall rules, because return traffic arrives on it.

TCP or UDP?

Most services are TCP, so it is more efficient to memorize the UDP exceptions: DHCP (67/68), TFTP (69), SNMP (161/162), NTP (123), Syslog (514), and IKE (500). DNS and Kerberos use both. Everything else on the list above is TCP, and the pattern holds well enough to guess from.

How to Actually Memorize These

  • Drill the pairs, not the individual numbers. Half the list comes free once the pairs are solid.
  • Group by function — mail (25, 110, 143, 465, 587, 993, 995), directory and authentication (49, 88, 389, 636, 1812), remote access (22, 23, 3389, 5900), databases (1433, 1521, 3306, 5432).
  • Use spaced repetition. Fifteen minutes of flashcards daily beats a three-hour cram session, and this is exactly the kind of material spacing was designed for.
  • Type them in. Run netstat -an on your own machine and match what you see against the table. Recognition in context sticks far better than a list.

Exam Tips

A+ (220-1201/1202). The core set only: 20/21, 22, 23, 25, 53, 67/68, 80, 110, 143, 443, 445, 3389. Expect straight recall and a few "which port does this service use" items.

Network+ (N10-009). The full table, plus the port ranges, plus TCP versus UDP. Expect troubleshooting scenarios where a blocked port is the cause — a user cannot reach a secure website, a mail client cannot retrieve messages, a device is not getting an address. Work backward from the symptom to the port.

Security+ (SY0-701). Ports appear as a security matter. Know which are dangerous when exposed (23, 445, 3389, 21), which secure alternative to recommend, and how port scanning and firewall rules use them. A question describing an unnecessary open port is asking about attack surface.

Key Takeaways

  • Ports are pure recall. There is no shortcut, but the list is short enough to own in a week.
  • Learn the insecure-to-secure pairs together — it halves the work and matches how exams ask.
  • Know the three ranges: well-known 0–1023, registered 1024–49151, ephemeral 49152–65535.
  • Memorize the UDP exceptions rather than the TCP majority.
  • 23, 445, 3389 and 21 are the ones that get organizations breached when exposed to the internet.

Comments