If you’re planning to take the CompTIA Security+ SY0-401 exam you should have many of the well-known ports memorized. Objective 1.5 “Identify commonly used default network ports” for the CompTIA Security+ exam lists several protocols and you should know the ports used for each of these.
If you understand ports, skip ahead to the relative tables.
Well Known Ports
Well known port numbers are matched to specific protocols and when you see the port, you should be able to identify the protocol. Sometimes you may be given the protocol and be required to identify the port. There are 1024 well known TCP and UDP ports (numbered 0 through 1023) but you don’t need to memorize them all. You should know the ports in the tables on this page.
Logical Ports
The well-known ports are logical ports and have nothing to do with physical ports. For example, TCP port 80 is the port used for Hypertext Transfer Protocol (HTTP) and TCP port 443 is the port used for Hypertext Transfer Protocol Secure (HTTPS).
In contrast, a physical port on a switch or router is used to make a physical connection between devices. You can touch the physical port while the logical port is simply a number embedded in the packet.
Every packet has both a source port and a destination port along with a source IP address and a destination IP address. The IP address is used to get the packet to the destination system and when the packet is received, TCP/IP uses the port information to determine how to handle the packet. This blog on Understanding Ports for Security+ describes the process of how logical ports are used in more detail.
CompTIA Security+: Get Certified Get Ahead: SY0-501 Study Guide
TCP and UDP
Each of these logical ports are technically identified as either a Transmission Control Protocol (TCP) port or a User Datagram Protocol (UDP) port depending on which transport protocol they use. When preparing for the Security+ exam, you should be aware of some of the protocols that use UDP instead of TCP.
If the protocol requires the benefits of TCP such as guaranteed delivery, it will use the TCP port. For example, web traffic using Hypertext Transfer Protocol (HTTP) uses TCP because web pages will not display properly if some of the packets aren’t received. TCP tracks all the packets and if one is lost, it sends a request to have it resent. This takes a little longer, but provides the assurance that all packets are received.
Some protocols use only the UDP port. For example, Trivial File Transport Protocol (TFTP) uses UDP port 69 but not TCP port 69.
Other protocols will use both TCP and UDP, depending on the purpose. For example, Domain Name System (DNS) will normally use UDP port 53 when responding to typical name resolution requests from clients. However, when one DNS server is transferring data to another DNS server, it will typically use TCP port 53.
The tables on this page specify whether a protocol uses TCP, UDP, or both. If you want to know specifically which transport protocol is used for other protocols, check out Wikipedia’s list of TCP and UDP port numbers.
Interestingly, Internet Assigned Numbers Authority (IANA) previously identified which transport protocol was used for each port in their Service Name and Transport Protocol Port Number Registry . However, they seem to have defaulted to just listing both TCP and UDP for each port. For example, Telnet (defined in RFC 854) only uses TCP port 23, not UDP. However, IANAs port number registry lists both TCP and UDP for Telnet.
Practice Test Question
When you know the ports and understand the protocols, questions are much easier to answer. For example, consider this practice test question:
Q. What port do you need to close to block outgoing email?
A. TCP port 22
B. TCP port 25
C. TCP port 110
D. TCP port 443
Answer at the end of the blog.
Will You Be Tested on Ports?
It’s entirely possible that if you take the time to memorize these ports, you might not get any questions on them. It’s rare, but some test takers report not seeing a single question on ports. However, this knowledge is still valuable to you in the field.
It’s also entirely possible that if you don’t memorize them, you’ll get ten questions on ports and drop the exam due to this lack of knowledge. With this in mind, it’s worth your time to memorize these ports. If you’re tested on them, the questions will be “gimme” questions that you’ll breeze through easily.
Security+ Ports
When preparing for the Security+ SY0-401 exam, you should know the ports in the following tables. They are organized based on usage.
File Transfer Ports
The ports in this table are used with protocols that transfer files.
File Transfer Protocols | TCP | UDP | Port |
---|---|---|---|
FTP – File Transport Protocol | TCP | 20, 21 | |
SSH – Secure Shell | TCP | 22 | |
SFTP – Secure File Transport Protocol (uses SSH) | TCP | 22 | |
SCP – Secure Copy (uses SSH) | TCP | 22 | |
TFTP – Trivial File Transport Protocol | UDP | 69 | |
FTPS – File Transport Protocol Secure (uses SSL) | TCP | 443 |
Email Ports
The ports in this table are used with email related protocols.
Email Related Protocols | TCP | UDP | Port |
---|---|---|---|
SMTP – Simple Mail Transport Protocol | TCP | 25 | |
POP3 – Post Office Protocol version 3 | TCP | 110 | |
IMAP4 – Internet message access protocol version 4 | TCP | 143 |
Master Security+ Performance Based Questions Video
Remote Access Ports
The ports in this table are associated with protocols used to connect to remote computers for various purposes.
Remote Access Protocols | TCP | UDP | Port |
---|---|---|---|
Telnet | TCP | 23 | |
TACACS – Terminal Access Controller Access-Control System | UDP | 49 | |
TACACS+ | TCP | 49 | |
SSL VPN – Secure Sockets Layer virtual private network | TCP | 443 | |
ISAKMP (VPN) – Internet Security Association and Key Management Protocol (virtual private network) | UDP | 500 | |
L2TP – Layer 2 Tunneling Protocol | UDP | 1701 | |
PPTP – Point-to-Point Tunneling Protocol | TCP | UDP | 1723 |
RDP – Remote Desktop Protocol | TCP | UDP | 3389 |
Miscellaneous Ports
The ports in this table don’t fit neatly in any of the other categories but are still relevant.
Protocol | TCP | UDP | Port |
---|---|---|---|
DNS – Domain Name System | TCP | UDP | 53 |
DHCP – Dynamic Host Configuration Protocol | UDP | 67, 68 | |
HTTP – Hypertext Transfer Protocol | TCP | 80 | |
HTTPS – Hypertext Transfer Protocol Secure | TCP | 443 | |
Kerberos | TCP | UDP | 88 |
NNTP – Network News Transfer Protocol | TCP | 119 | |
SNMP – Simple Network Management Protocol | UDP | 161 | |
SNMP Trap – Simple Network Management Protocol Trap | TCP | UDP | 162 |
LDAP – Lightweight Directory Access Protocol | TCP | UDP | 389 |
Syslog | UDP | 514 |
Check out this online resources:
SY0-501 Practice Test Questions
Practice Test Question Answer
Q. What port do you need to close to block outgoing email?
A. Port 22
B. Port 25
C. Port 110
D. Port 443
Answer: B
TCP port 25 is used for SMTP and SMTP is used for outgoing email.
TCP port 22 is used for SSH, SFTP, and SCP but not for email.
TCP port 110 is used for POP3 but POP3 is only used for incoming email, not outgoing email.
TCP port 443 is used for HTTPS, not email.
Summary
There are 1024 well known TCP and UDP ports, numbered 0 through 1023. You don’t need to memorize them all but you should know some of the common port numbers when preparing for the Security+ exam. You should also know which protocols have a preference of TCP over UDP. These concepts are covered in more depth in the CompTIA Security+: Get Certified Get Ahead- SY0-401 Practice Test Questions.
Good luck.
A colleague took the exam today. And passed. One bit of info he shared was on his exam, knowing xxx wasn’t enough. The question wanted to know what xxx.
Hi Josh,
That comment is a little too specific and violates the CompTIA NDA and testing policies. Posting it here can get both of us in trouble.
However, the content is covered in the CompTIA Security+: Get Certified Get Ahead: SY0-401 Study Guide in chapter 4.
I see that you purchased practice test questions on the gcgapremium.com site. If you take all of those questions, you’ll see that the content is covered there too.
Good luck on exam day.
Hello, I just had a question regarding SYS401.
I noticed that in your textbook Security+ Get Certified Get Ahead, there is a table 3.1 that shows a list of well known ports. I’ve seen a list created by others that seemed much more extensive than the one you had. I was wondering just for the purpose of this exam, Security+, is the table listed in your textbook sufficient?
Thank you in advanced!
You’re referring to table 3.1 in the CompTIA Security+: Get Certified Get Ahead: SY0-401 Study Guide. It has been sufficient for many.
I’ve also added some questions with different ports and protocol IDs to some of the online packages.
Hi Darril,
I’m taking my Security+ exam this Thursday afternoon. In preparing for the Performance Based questions where you have to configure an ACL for a firewall, I”m a little confused regarding which ports are TCP and which are UDP. For example, in your chart above you list DNS which is port 53 as using TCP and UPD. I have your book as well as another book by Emmett Dulaney (CompTIA Security+ Study Guide, Fifth Edition), and in his book (page 37) he lists DNS as being port 53 UPD only. I’m concerned that on the exam I won’t know if a port is TCP, UPD, or both.
Also, for configuring the firewall ACL, if a port uses both TCP and UPD, would you have to list a line in the ACL for TCP and a line for TCP? Would you also have to list Deny all at then end for implicit deny. This question relates to the exam.
Thanks
Hi Joe,
DNS uses both TCP and UDP. Queries to DNS for name resolution use UDP. However, when DNS servers transfer information between each other they use TCP.
Can you tell me how to adjust the seat position on any car I might drive? You probably could, but there isn’t a single answer that covers them all. Instead, different car seats have different methods of adjusting them.
Similarly, different firewalls have different methods.
Some firewalls require separate allow lines in the ACL for both TCP and UDP.
Others allow you to create a single line for a port using any protocol.
Some firewalls require you to add a Deny All line at the end to enforce an implicit deny strategy.
Other firewalls have this line built in and even when you don’t add the line, the firewall still enforces it.
Good luck.
Thanks for the list but I have a small issue regarding FTPS.
From my research I thought FTPS uses either (TCP) 989 and (TCP) 990 (implicit mode) or Port 21 and 20 (via explicit mode)?
But you have listed TCP 443?
I’m confused?
This is one of those questions that really doesn’t have a right answer but from the perspective of the Security+ exam, there is a “correct” answer. This blog focuses on what you need for Security+.
In the CompTIA Security+: Get Certified Get Ahead: SY0-301 Study Guide, I mention that “FTP uses port 20 for data and port 21 for control signals” and “some implementations of FTPS use ports 989 and 990.”
FTPS uses SSL and SSL is commonly associated with port 443.
Consider these three questions:
Q. What port(s) does FTPS use?
A. 443
B. 1
C. 2
D. 3
Obviously, to get the answer correct, you’d choose A though some people might disagree with the accuracy of the answer.
Q. What port(s) does FTPS use?
A. 989 and 990
B. 1
C. 2
D. 3
Obviously, to get the answer correct, you’d choose A though some people might suggest that the question should state “implicit mode.”
Q. What port(s) does FTPS use?
A. 20 and 21
B. 1
C. 2
D. 3
Obviously, to get the answer correct, you’d choose A though some people might suggest that the question should state “explicit mode.”
All that said, your level of knowledge has expanded beyond what you need for the Security+ exam. If you move into the SSCP or CISSP exam, this extra knowledge is useful but I’d suggest you don’t let it stop you from seeing the “simple” answers on the Security+ exam.
I just passed the Security + exam this morning in GA. I was presented the 70 question bank and the first 7 questions were simulations. Of the 7, the first 3 were straight forward port-related. The other 4 were much more detailed in an effort to test your network and configuration savvy. Flag them and come back. You will need the time, believe me. Darril, your book and plenty of practice test were all that was needed in a committed 2 to 3 month plan from scratch. Thank you. Where can I go from here to develop and hone my security skills?
Congratulations on the pass. Great to hear the book helped.
Many people pursue the SSCP exam after the Security+. Here’s a resource that might help: http://www.amazon.com/Systems-Security-Certified-Practitioner-Guide/dp/0071771565
Congratulations again, and good luck in your next adventure.