Ports and Protocols Cheat Sheet for Network+ and Security+ (2026)
Last reviewed against the current CompTIA Network+ N10-009 exam page (Domain 1, ports, protocols, services and traffic types) and CompTIA Security+ SY0-701 objectives 4.5 (secure protocols, port selection) and 3.2 (port security) exam objectives (official objectives). Found an error? Tell us and we will correct it.
Practice this exam: free Security+ SY0-701 practice test— 50 original questions with explanations, no signup.

You can pass every port question on Network+ and Security+ with 43 port numbers, and most of them come in pairs: an insecure protocol and the encrypted replacement that took its job. Learn the pairs, not the list. Telnet 23 became SSH 22. HTTP 80 became HTTPS 443. LDAP 389 became LDAPS 636. Once you see ports as families with a secure sibling, the memorizing mostly takes care of itself.
This ports and protocols cheat sheet gives you the full table grouped by job, the insecure-to-secure pairs the exams love, a way to hold it all in your head, and twelve drills with the answers worked out. Want to see which ports you already know cold? Our free Network+ N10-009 practice test mixes port questions into every domain, no signup required.
Independent study resource. Not affiliated with or endorsed by CompTIA. Exam codes, objectives, and weightings are set by the vendor. Always confirm current details on the official exam pages before booking.
Key Takeaways
- Network+ N10-009 tests ports directly. Its Domain 1 (23% of the exam) has a whole objective on common ports, protocols, services and traffic types, naming FTP, SFTP, SSH, Telnet, SMTP, DNS, DHCP, HTTP, HTTPS, SNMP, LDAP, RDP and SIP.
- Security+ SY0-701 tests ports sideways. Objective 4.5 asks you to pick the secure protocol and the right port for a scenario. Nobody hands you a list to recite.
- Most insecure protocols on the sheet have a secure replacement, and that pairing is the pattern to learn first. 21 to 22, 23 to 22, 80 to 443, 389 to 636, 143 to 993, 110 to 995, 514 to 6514.
- Port 22 is shared by SSH, SFTP and SCP. Port 53 is both UDP and TCP. Port 161 is SNMP polling and 162 is traps. These three facts settle a lot of trick questions.
- "Port security" on Security+ has nothing to do with port numbers. It means controlling who can join through a switch interface, with 802.1X and EAP (objective 3.2), not to be confused with the classic MAC-address-limiting switch feature of the same name. Don't let the shared word fool you.
What Does Each Exam Actually Ask About Ports?
Different things, and it changes how you should study. Network+ ports are about recall. Security+ ports are about judgment.
On the N10-009, ports live in Domain 1, Networking Concepts, which carries 23% of the exam. CompTIA's own topic summary for that domain includes "ports, protocols, services, and traffic types" and lists FTP, SFTP, SSH, Telnet, SMTP, DNS, DHCP, HTTP, HTTPS, SNMP, LDAP, RDP and SIP (CompTIA Network+ exam page). It also covers the four traffic types: unicast, multicast, anycast and broadcast. Network services like DHCP, DNS, NTP, PTP and NTS come back again in Domain 3, Network Operations (19%). You get 90 minutes for up to 90 questions. A port question you can answer in five seconds is five seconds you get back for a performance-based item.
Security+ SY0-701 doesn't publish a port table. What it has is objective 4.5, "modify enterprise capabilities to enhance security," which lists secure protocols, with protocol selection and port selection among its sub-bullets (CompTIA Security+ SY0-701 exam page). So the question looks like "a firewall log shows outbound traffic on TCP 23, what should the admin do?" and you're expected to know that's Telnet, that it's plaintext, and that the fix is SSH on 22. The format is the same: up to 90 questions in 90 minutes.
One date to keep in mind. CompTIA lists the next version, Security+ V8 (SY0-801), with a launch date of November 17, 2026, and the English SY0-701 exam retires on June 11, 2027 (CompTIA Security+ V8 page). If you're booked for SY0-701, nothing below changes. If you end up on V8, check its objectives before you book. Protocol selection has been a core Security+ skill for years, and the port numbers themselves are IANA assignments that don't change with the exam version.
| Exam | Where ports live | What you have to do |
|---|---|---|
| CompTIA Network+ N10-009 | Domain 1, Networking Concepts (23%), the ports, protocols, services and traffic types objective, with services again in Domain 3 (19%) | Match a port to its protocol and back, know TCP vs. UDP, recognize the traffic type |
| CompTIA Security+ SY0-701 | Objective 4.5, secure protocols (protocol selection, port selection). Objective 3.2 covers 802.1X "port security," a different thing entirely | Spot the insecure protocol in a scenario, name its secure replacement, pick the right port for a firewall rule |
The Ports and Protocols Cheat Sheet (Print This Part)
Port numbers come from the IANA Service Name and Transport Protocol Port Number Registry, which is the single source of truth for every row below (IANA port number registry). I've grouped them by what the protocol does, because that's how your brain will retrieve them under pressure. The RFC links are there for the protocols whose own standard spells out the port and the transport.
Remote access and file transfer
| Port | Protocol | Transport | What it does | Secure replacement / note |
|---|---|---|---|---|
| 20, 21 | FTP | TCP | File transfer in the clear. 21 is the control connection and 20 is the default data port. RFC 959 defines the control and data pairing, and the port numbers are in the IANA registry | SFTP on 22 or FTPS on 989/990 |
| 22 | SSH, SFTP, SCP | TCP | Encrypted shell. SFTP and SCP ride inside the SSH connection, so all three share the port (RFC 4253) | Already encrypted. SFTP and SCP inherit it |
| 23 | Telnet | TCP | Plaintext remote terminal. Credentials cross the wire readable | SSH on 22 |
| 69 | TFTP | UDP | Trivial file transfer, no authentication. Used for firmware and config pushes to network gear (RFC 1350) | SFTP on 22, or keep it on an isolated management network |
| 445 | SMB | TCP | Windows file and printer sharing over TCP directly | Block at the perimeter. SMB 3 adds encryption |
| 989, 990 | FTPS | TCP | FTP wrapped in TLS. 990 is control, 989 is data | Already encrypted. Not the same thing as SFTP |
| 3389 | RDP | TCP | Remote Desktop Protocol, graphical Windows remote access | Put it behind a VPN or gateway. Never open 3389 to the internet |
Web, DNS and time
| Port | Protocol | Transport | What it does | Secure replacement / note |
|---|---|---|---|---|
| 53 | DNS | UDP and TCP | Name resolution. UDP for ordinary queries, TCP for zone transfers and answers too big for one datagram (RFC 1035) | DNS over TLS on 853, DNS over HTTPS on 443 |
| 80 | HTTP | TCP | Web traffic in the clear (RFC 9110) | HTTPS on 443 |
| 443 | HTTPS | TCP | HTTP inside TLS. Also the port DNS over HTTPS uses, which is why DoH is hard to filter (RFC 8484) | The default for encrypted web traffic |
| 853 | DNS over TLS | TCP | DNS queries wrapped in TLS on a dedicated port (RFC 7858) | Encrypted by design |
| 123 | NTP | UDP | Clock sync. If NTP breaks, Kerberos and certificate validation break with it (RFC 5905) | Network Time Security (NTS) adds authentication |
| 8080 | HTTP alternate | TCP | Common for proxies and second web servers. Not a secure variant of anything | Still plaintext |
| Port | Protocol | Transport | What it does | Secure replacement / note |
|---|---|---|---|---|
| 25 | SMTP | TCP | Server-to-server mail relay | Mail clients should submit on 587 or 465 instead |
| 587 | SMTP submission | TCP | Client-to-server mail submission, upgraded to TLS with STARTTLS (RFC 6409). Often labelled SMTPS in study material | Secure when STARTTLS is enforced |
| 465 | SMTP over implicit TLS | TCP | Mail submission that starts encrypted from the first byte (RFC 8314) | Encrypted from the first byte |
| 110 | POP3 | TCP | Download-and-delete mail retrieval in the clear (RFC 1939) | POP3S on 995 |
| 995 | POP3S | TCP | POP3 over implicit TLS (RFC 8314) | The secure option |
| 143 | IMAP | TCP | Mail retrieval that keeps messages on the server (RFC 9051) | IMAPS on 993 |
| 993 | IMAPS | TCP | IMAP over implicit TLS (RFC 8314) | Encrypted IMAP |
Directory, authentication and AAA
| Port | Protocol | Transport | What it does | Secure replacement / note |
|---|---|---|---|---|
| 49 | TACACS+ | TCP | Cisco-style AAA for device administration, with per-command authorization (RFC 8907) | Compare with RADIUS below |
| 88 | Kerberos | UDP and TCP | Ticket-based authentication, the engine behind Active Directory logons (RFC 4120) | Depends on NTP (123) for timestamps |
| 389 | LDAP | TCP | Directory lookups and binds in the clear | LDAPS on 636 |
| 636 | LDAPS | TCP | LDAP over TLS | Encrypted by design |
| 1812, 1813 | RADIUS | UDP | AAA for network access. 1812 is authentication, 1813 is accounting (RFC 2865, RFC 2866) | The back end for 802.1X |
Monitoring and management
| Port | Protocol | Transport | What it does | Secure replacement / note |
|---|---|---|---|---|
| 161 | SNMP | UDP | The manager polls agents on 161 (RFC 3417) | Use SNMPv3 for authentication and encryption. Same port |
| 162 | SNMP trap | UDP | Agents send unsolicited alerts to the manager on 162 (RFC 3417) | Same SNMPv3 advice |
| 514 | Syslog | UDP | Log forwarding in the clear on the conventional UDP port. RFC 5426 defines the UDP transport, and the port is in the IANA registry | Syslog over TLS on 6514 |
| 6514 | Syslog over TLS | TCP | Encrypted, authenticated log transport (RFC 5425) | TLS-protected syslog |
| 67, 68 | DHCP | UDP | Server listens on 67, client on 68 (RFC 2131) | DHCP snooping on switches guards against rogue servers |
| 5060, 5061 | SIP | UDP and TCP (5060), TCP with TLS (5061) | Call setup for VoIP (RFC 3261) | 5061 is the TLS-protected one |
Databases and storage
| Port | Protocol | Transport | What it does | Secure replacement / note |
|---|---|---|---|---|
| 1433 | Microsoft SQL Server | TCP | Default instance of SQL Server | Never internet-facing. Firewall it to the app tier |
| 3306 | MySQL | TCP | Default MySQL and MariaDB listener | Same rule |
| 3260 | iSCSI | TCP | Block storage over IP (RFC 7143) | Dedicated storage VLAN |
VPN and tunneling
| Port | Protocol | Transport | What it does | Secure replacement / note |
|---|---|---|---|---|
| 500 | IKE (IPsec) | UDP | Key exchange that sets up an IPsec tunnel (RFC 7296) | Already encrypted |
| 4500 | IPsec NAT traversal | UDP | IKE and ESP encapsulated in UDP so they survive NAT (RFC 7296) | Open both 500 and 4500 for remote-access IPsec |
| 1701 | L2TP | UDP | Tunneling with no encryption of its own, so it's paired with IPsec (RFC 2661) | L2TP/IPsec |
| 1723 | PPTP | TCP | Legacy Microsoft VPN control channel (RFC 2637) | Retire it. Use IPsec or a TLS-based VPN |
Where do all these numbers come from? The port space is split into three ranges. System Ports run 0 to 1023 and are assigned under the strictest review (IETF Review or IESG Approval). User Ports run 1024 to 49151 and are registered with IANA. Dynamic Ports run 49152 to 65535 and are never assigned, which is why your browser's source port lands up there (RFC 6335). Nearly everything on the cheat sheet sits in the first two ranges, and it's worth knowing them in case a question asks.
Which Insecure Protocol Maps to Which Secure One?
If you only have ten minutes before the exam, learn this table. Security+ scenarios lean on it, and Network+ can ask it straight.
| Plaintext protocol | Port | Secure replacement | Port | How it's secured |
|---|---|---|---|---|
| Telnet | 23 | SSH | 22 | Encrypted channel with host keys |
| FTP | 20, 21 | SFTP | 22 | Runs inside SSH |
| FTP | 20, 21 | FTPS | 989, 990 | FTP inside TLS |
| HTTP | 80 | HTTPS | 443 | HTTP inside TLS |
| DNS | 53 | DNS over TLS / DNS over HTTPS | 853 / 443 | Queries inside TLS or HTTPS |
| SMTP relay | 25 | Submission with STARTTLS / implicit TLS | 587 / 465 | Opportunistic or immediate TLS |
| POP3 | 110 | POP3S | 995 | Implicit TLS |
| IMAP | 143 | IMAPS | 993 | Implicit TLS |
| LDAP | 389 | LDAPS | 636 | LDAP inside TLS |
| SNMPv1/v2c | 161, 162 | SNMPv3 | 161, 162 | Same ports, adds authentication and privacy |
| Syslog | 514 | Syslog over TLS | 6514 | TLS transport |
| SIP | 5060 | SIP over TLS | 5061 | TLS on the signaling channel |
| PPTP | 1723 | IPsec (IKE) | 500, 4500 | Authenticated key exchange, encrypted ESP |
Notice two things. The secure version usually gets a new port, except SNMPv3 and SSH-based replacements, which reuse the existing one. And the secure replacement almost always means TLS or SSH. If a scenario says "encrypt it," your answer is nearly always one of those two wrappers.
How Do You Memorize 43 Ports Without Burning Out?
Not with a flat alphabetical list. Here's what actually sticks.
Learn the "22 club" first. SSH, SFTP and SCP are all port 22, because the last two are file transfer running inside an SSH session. One number, three protocols, and it knocks out the most common Network+ trick question in one go.
Climb the mail ladder. 25 relay, 110 POP3, 143 IMAP for the plaintext rungs. Then 465 and 587 for sending, 993 and 995 for the two secure retrieval rungs. Say it out loud as a sequence: 25, 110, 143, 465, 587, 993, 995. Seven numbers, every mail question.
Pair the plus-TLS ports. 80 becomes 443. 389 becomes 636. 514 becomes 6514. 5060 becomes 5061. 143 becomes 993. 110 becomes 995. Each secure port is a bigger number than the one it replaced, which is a dumb mnemonic that works. (SSH is the exception: it swaps Telnet's 23 for 22.)
Remember direction for the two-port protocols. DHCP: server 67, client 68 (the server came first). SNMP: polls go to 161, traps come back on 162. RADIUS: authentication 1812, accounting 1813. FTP: control 21, data 20. Don't hunt for a rule about which number is the main one. DHCP's server is the lower number (67) and FTP's control channel is the higher one (21). Just learn the job of each: 67 listens, 68 asks. 21 commands, 20 carries data.
Put UDP on a short list. Most of the sheet is TCP. The UDP ones are a small set worth naming: DNS (also TCP), DHCP, TFTP, NTP, SNMP, syslog, RADIUS, IKE and NAT-T, L2TP, and SIP's 5060 (also TCP). If a question asks "which of these is UDP," run that list and pick the match.
Ten minutes a day for a week is a reasonable starting plan. Stretch it if you're still missing a family. If you want a structured way to do that, the active recall and spaced repetition guide explains why daily short drills beat one long cram.
Twelve Drills With Answers
Cover the tables and answer these cold. Every one uses the scenario style the objectives describe: a number in a log line, or a protocol that needs its port. Answers follow each drill.
- A firewall log shows a workstation connecting out to TCP 3389 on an internet address. What's the service, and should it worry you?
RDP. Yes, worry. Outbound RDP across the internet is rarely legitimate and is a common sign of attacker access or a tunnel. Check it against the approved remote-access path. Internal RDP belongs behind a VPN or gateway. - A junior admin configures a switch to send its logs to a collector on UDP 514. Which protocol is this and what's the secure alternative?
Syslog. Switch to syslog over TLS on TCP 6514 so the logs can't be read or altered in transit. - A monitoring server isn't receiving device alerts, but polling works fine. Which port is probably blocked?
UDP 162. Polling uses 161 (manager to agent). Traps are agent to manager on 162. A firewall that allows 161 but not 162 produces exactly this symptom. - You need to allow SFTP through a firewall. Which port do you open?
TCP 22. SFTP runs inside SSH. If you opened 989/990 you allowed FTPS, which is a different protocol. - A user's mail client is set to send on port 25 and it keeps failing from hotel Wi-Fi. What port should the client use?
587 (submission with STARTTLS) or 465 (implicit TLS). Port 25 is for server-to-server relay and many networks block it outbound to cut down on spam. - A packet capture shows a login to a directory service in cleartext on TCP 389. What's the fix?
Move to LDAPS on TCP 636, which wraps LDAP in TLS. - Which port must be open for a client to request an IP address from a DHCP server?
UDP 67 on the server side, with the client listening on UDP 68. If a question offers only one number, 67 is the server side. - A DNS zone transfer between two servers is failing even though normal lookups work. What's the likely transport problem?
TCP 53 is blocked. Ordinary queries use UDP 53, but zone transfers use TCP 53. Opening only UDP produces this exact failure. - A security policy says "replace all Telnet administration with an encrypted alternative." Which protocol and port?
SSH on TCP 22. - A remote-access VPN uses IPsec, and users behind home routers can't connect while users on public IPs can. Which port is missing from the firewall rule?
UDP 4500 (NAT traversal). IKE on UDP 500 alone isn't enough once there's a NAT in the path. - Kerberos authentication is failing across the domain and the help desk says "the time is wrong on the servers." Which port and protocol does that point to?
NTP on UDP 123. Kerberos tickets carry timestamps, so a clock drift breaks logons. Kerberos itself is on 88, but the root cause is time sync. - A Security+ question asks you to "implement port security" on access switches. Do you start writing firewall rules for port numbers?
No. In SY0-701 objective 3.2, port security means 802.1X with EAP on physical switch ports, so unauthenticated devices can't join the LAN. Port numbers belong to objective 4.5.
If you missed more than three, don't reread the whole sheet. Go back to the specific family you missed (mail, management, VPN) and redo only that section tomorrow.
Where Do People Lose Points?
These are the six mix-ups that cost the most points, in roughly the order they bite. For a sense of how often ports come up: 2 of the 50 questions in our free Network+ practice test are straight port questions (HTTPS and NTP), both in the Domain 1 review, and both are the kind you should answer in five seconds.
Look-alike pairs. SFTP and FTPS sound alike and both encrypt file transfers, but SFTP is an SSH subsystem on port 22 and FTPS is FTP inside TLS on 989/990. Same trap with 465 and 587: both are mail submission, but 587 negotiates TLS with STARTTLS and 465 is encrypted from the first byte. Expect both halves of each pair to look plausible as answer choices. Pick by port. Study material often calls 587 "SMTPS", but RFC 8314 and IANA reserve the implicit-TLS "submissions" name for 465, so answer by port number and transport rather than by the label.
Picture the question: "The monitoring server can poll every switch, but no alerts ever arrive." That's 161 versus 162 again. Polls go to the agent on 161, traps come from the agent on 162, and the word "alert" or "trap" is your cue for the second one.
Assuming DNS is UDP only. It's UDP for everyday queries and TCP for zone transfers and large responses. A scenario about a secondary DNS server that never updates is a TCP 53 question in disguise.
Then there's the one that costs people a question they actually knew. "Port security" on Security+ means controlling which devices can plug into a switch port, with 802.1X and EAP. Nothing to do with port numbers.
RADIUS versus TACACS+. A favorite compare-and-contrast. RADIUS is UDP on 1812 and 1813, hides only the password field in its packets, and is the usual back end for 802.1X. TACACS+ is TCP on 49 and obfuscates the whole packet body (RFC 8907's own word for it, rather than true encryption), which is why it's preferred for device administration.
1433 is Microsoft SQL Server. 3306 is MySQL. Neither belongs on a public IP, and a scan result showing either one open to the internet is usually the question's real point.
Most of these come down to the same habit: read the number in the scenario first, then decide what the question is really about. The network attacks walkthrough uses the same approach on the Security+ side, where the port in a log line often tells you which attack you're looking at.
FAQ
How many ports do I need to memorize for Network+?
The CompTIA Network+ exam page lists FTP, SFTP, SSH, Telnet, SMTP, DNS, DHCP, HTTP, HTTPS, SNMP, LDAP, RDP and SIP under the ports and protocols topic in Domain 1 (CompTIA Network+ exam page). The 43 on this sheet cover those protocols plus the AAA, VPN, database and storage ports that Security+ scenarios lean on.
Does Security+ ask for port numbers directly?
Rarely as a bare "what port is X" question. SY0-701 objective 4.5 lists protocol selection and port selection under secure protocols (CompTIA Security+ SY0-701 exam page), so the port shows up inside a scenario and you're expected to recognize what it implies and pick the secure fix.
What's the difference between SFTP and FTPS?
SFTP is a file-transfer subsystem of SSH, so it uses TCP 22 and SSH's encryption (RFC 4253 covers the SSH transport it rides on). FTPS is the original FTP protocol wrapped in TLS on ports 989 and 990. Different protocols, different ports, same goal.
Why does DNS use both UDP and TCP on port 53?
RFC 1035 specifies UDP for ordinary queries and TCP for zone transfers and for responses that won't fit in a single datagram (RFC 1035). RFC 7766 later made TCP support mandatory for general-purpose DNS implementations, so blocking TCP 53 can break large responses, including many DNSSEC-signed answers.
Is port 22 secure just because it's SSH?
The protocol is encrypted, but the port being open is still an attack surface for brute-force logins. The Security+ answer is to keep SSH on 22, disable password authentication in favor of keys, and restrict the source addresses that can reach it. Changing the port number is obscurity, not security.
Drill It Until the Numbers Are Boring
Network+ ports are pure recall: you either know 636 is LDAPS or you don't. Security+ adds the judgment layer, but only if the recall is already automatic. That makes them the cheapest points on both exams, and the fastest to lose if you skip the drilling. Run the twelve questions above, keep the ports and protocols cheat sheet nearby for review, then test the whole set in context with the free Network+ N10-009 practice test, where the port questions arrive mixed in with everything else, the way they will on exam day. Studying for Security+ instead? The free Security+ SY0-701 practice test puts the Security+ ports inside the scenarios objective 4.5 describes.
And when you're done with ports, the next Domain 1 skill most people need is subnetting. The subnetting cheat sheet uses the same approach: a short table, one method, and drills with answers.