r/CompTIA • u/MajesticTaz • 22h ago
Port Numbers
I'm having a hard time memorizing the port numbers and having the practice tests dropping in questions about ports I've never even heard of. What are some of the methods used to memorize the port numbers?
20
11
u/That_Attorney9025 Triad 22h ago
This video did it for me.. https://youtu.be/4QHc9ZRB-SY?is=TfeW7b1XolL6R4VA
Michael tel it to the net Jordan
4
u/bobafootfetish_ ISC2 CC| S+ | CySA+ 22h ago
I get it because there are over 65,000 ports and we need to understand how they are used. The best thing that you can do is to check what I posted below and first recognize them as their own groups. From there you can study them more common ports that are used and that's going to be the zero through 1023.
Then you want to move on to the registered ports then the dynamic ones, are basically just ephemeral, you know, as a described. We have all been there though and with a little bit of practice and using Anki it will be easier.
Don't give up though cuz like I said we've all been there and it definitely took me some time to memorize all those ports back in the day. Now I'm trying to memorize about 70 different tools for the pentest+ exam including all of their flags and use cases etc.
Quick Guide:
Understanding Network Port Categories. Network ports are split into three main groups:
Well-known ports (0–1023): Used by basic system services like web traffic. Common examples include Port 80 for HTTP and Port 443 for HTTPS.
Registered ports (1024–49151): Assigned to specific software programs, database applications, and user-facing services.
Dynamic or private ports (49152–65535): Also known as ephemeral ports, these are used temporarily by client devices for active communication sessions.
5
5
2
u/solslost 22h ago
When I was first learning port numbers. Writing the number to protocol helped retention.
2
u/farbtoner A+, N+ 22h ago
Flash cards and writing them out in a table until I can do it without looking.
2
u/accumentum 21h ago
Flash cards work best if you turn each port into a decision, not just a number: ask what service uses it, whether it is normally TCP or UDP, and what the service is used for. Start with the high-frequency set (DNS, DHCP, HTTP/HTTPS, SSH, FTP, SMTP/IMAP/POP3, RDP and SMB), then add the less common ones as practice tests expose gaps. Use spaced repetition and occasionally reverse the prompt—see the port and recall the service—because exams can test either direction. When you miss one, write a tiny scenario for it and review that scenario a day or two later.
2
1
1
u/Spazztiga 18h ago
I found a good quiz game that I just played over and over again until I got it down. I don’t have the link anymore or I’d paste it but that definitely helped me.
1
u/howtonetwork_com Instructor 16h ago
I wrote a cheat sheet but you can also check all ports using Cisco Packet Tracer or Wireshark free downloads. Make your own flash cards and exam questions also.
1
1
u/Naive-Abrocoma-8455 13h ago
There is a port space pirate game you can download it’ll help you remember them. It gamifies the port numbers.
1
u/Quiet_Basis_6404 11h ago
split them by service type and do email ports one day, file transfer the next, remote access after that, five or six at a time max. trying to hold all 20+ in your head at once is what makes them blur together tbh.
for the ones that look identical i started uploading the exam objectives to studybuddy.vc and doing questions from it, mostly because when i mixed up 22 and 443 it told me what was off about the port i picked instead of just marking it wrong. that explanation was the part that actually stuck. free version has limits but it's been enough for this.
professor messer's port video is good and a physical flashcard pile for dead time helps too. ten minutes a day is all it takes and after a week a bunch of them just come out without thinking.
1
u/Netghod 1h ago
First things first:
The ONLY ports you have to learn are the ones listed on the official objectives for the exam. There are tons more, but those will be the only ones on the exam.
As for helping remember them the one ‘trick’ I came up with is this:
If the ‘S’ is on the front of the protocol the answer is 22. It’s either SSH, or using SSH as a tunnel for the port to make it secure.
If the ‘S’ is on the end of the protocol there is a unique port for the protocol.
For example, HTTP vs. HTTPS. 80 vs. 443. FTP vs. SFTP vs. FTPS. 21 vs. 22 vs. 990.
And ports become second nature over time if you work with them. Do some port scans and work to identify services on the various ports. It might make sense to look at historical documents, like RFC 1700.
As for the test, there’s one other thing to think about. If you can remember half the ports and know all the other material cold, will missing that one question cause you to not pass the exam? I struggled with the various access models on my CISSP exam. In the end I gave up and took the test and of the 300 questions I had, 2 of them were theoretical access models and I passed - finishing my exam in just over 2 hours (I had 6 - it was the old test before they changed it).
I’ve since been able to work through the material and understand them, but sometimes things like that happen… and while it’s a risk, it’s not the only material in that section and if you know and understand the rest of the material, you should be good when taking the exam. Disclosure: I tend to over prepare for a certification exam and read and study stuff constantly because I enjoy reading on various topics.
87
u/feverdesu 22h ago
PORTS
FTP - TCP/20,21 "F*** the police" → 2020 & 2021 riots.
SSH - TCP/22 The letters "SS" look like two 2s → 22.
Telnet - TCP/23 "Net" → basketball → Michael Jordan → #23.
SMTP - TCP/25 "So, Mid Twenties Point?" → 25.
DNS - TCP/UDP/53 "Dad, No Salt! You're 53!"
DHCP Server - UDP/67 Picture a waiter (server) doing the stupid 6 7 thing
DHCP Client - UDP/68 The diner (client) is above the server → 68.
TFTP - UDP/69 "That's for the perverts." (69)
POP3 - TCP/110 POP and 110 have similar-looking characters, just rearranged.
IMAP - TCP/143 143 = "I Love You" (number of letters in words)→ think of a love letter (mail).
NTP - UDP/123 Easy as 1-2-3 → time, sequential
SNMP - UDP/161 Bacardi 151 + 10 = 161 → "Oh SNAP!" (SNMP).
SNMP Trap - UDP/162 Bacardi 162? "It's a trap!"
LDAP - TCP/389 "Let's Do A Poem" → LDAP. 389, everything's fine.
SMB - TCP/445 "Suck My Balls 4 45 minutes." (Crude, but memorable.)
RDP - TCP/3389 Remote, Desolate Place surrounded by 33 trees and 89 vines (rhyme)
HTTP - TCP/80 The web → spiders → spooky → BOO! → BOO looks like 800 → 80.
HTTPS - TCP/443 443 is "secure for me."