What Is My Port Number and How To Find It?
Has an application ever asked you to open a specific port to ensure proper operation? The port number is a way of identifying an application on a specific network, but before you can open the right port, you need to know your own port number. This guide will take you through how to find your port number.
Opening the right port is important for ensuring applications work correctly, but you also need to ensure you’re remaining safe online. A VPN like VeePN can provide that safety by encrypting your connection and hiding your computer’s presence online. With more than 50 locations and over 2,000 different servers, VeePN blocks bad actors from tracing your activity.
What is a port?
In the most technical definition, a port is where a connection both starts and ends. Your computer’s operating system manages the port, and each port is associated with a different application. For example, your email will be managed by a separate port than a multiplayer round of Fortnite.
What is my port number?
Your port number is a form of identification. Depending on the server and application, your port number lets the receiving server know where the message came from. There are 65,535 ports for each IP address, so your port number could be one of many.
Why do I need to know my port number?
Your port number plays a large role in troubleshooting bugs and issues with your machine. You need to know your port number to configure your firewall and filter out unwanted IP addresses. If you know your port number (and the number of an incoming message), you can block out unwanted emails, web pages, and more. Your port number is vital to your online security. As long as you know it, you have a much finer level of control over your security.
What’s the difference between a UDP and a TCP port?
There are two main types of ports: UDP and TCP. TCP is a connection-focused protocol, which means it needs an established connection before it can transfer data – and in theory, should close this connection once the transfer completes. UDP doesn’t require a connection, and therefore has no regulations on when it opens, operates, or terminates a connection.
How do I find my port number?
If you’re trying to find the exact reason an error keeps occurring or you just want to improve your online security, there are different approaches depending on your operating system.
How to find your port number on Windows
You need to use the command prompt to find your port number on Windows.
- Open the
- Enter netstat -a. Note that the space between the hyphen and the A is essential
- The Command Prompt will list out every port number available to you, as well as its type (TCP or UDP)
How to find your port number on Mac
Finding your port numbers on Mac is similar to Windows, except that you use the Terminal instead of the Command Prompt.
- Open Terminal
- Type in netstat -a | grep -i “listen”
How do I find the port number of a specific IP address?
Finding the port number of a specific IP address is as simple as finding your IP addresses and sifting through the results. The port number is shown after the IP address, separated by a series of characters that look like [::]:
- Open the Command Prompt. (Or perform the Mac equivalent.)
- Enter netstat -a to view the list of IP addresses in use
- Look at the list of IP addresses, then look just to the right of them
Common port numbers
There are a lot of potential port numbers, but you don’t need to memorize all 65,000+ of them. You just need to know some of the most common ports and what their primary use is.
- 20 – File Transfer Protocol transfer
- 21 – File Transfer Protocol command control
- 22 – Secure Shell (SSH)
- 25 – Email routing through Simple Mail Transfer Protocol (SMTP)
- 42 – Internet Name Service
- 53 – Domain Name System (or DNS) service
- 80 – Hyper Text Transfer Protocol (HTTP) on the web
- 194 – Internet Relay Chat (IRC)
- 443 – HTTP Secure (HTTPS) over TLS or SSL.
How to open a port
In many instances, ports are left closed for security purposes. They are only opened when needed by an ongoing service or application; however, sometimes a glitch prevents the port from opening as it should. If this happens, you will need to manually open the port to ensure proper operation of the application.
How to open a port on Windows 10
You can open ports on Windows 10 through the use of your Control Panel and Windows Defender Firewall.
- Open Control Panel
- Go to System and Security > Windows Defender Firewall
- Select Advanced Settings
- Select Inbound Rules
- Select New Rule > Port
- Select Protocol and Ports
- Select whether the port is TCP or UDP, then enter the port number into Specific local ports. After this, select Next
- Select Allow the connection and click Next
- Select what networks this rule applies to and click Next
- Name the rule, give it a description, and select Finish
How to open a port on Mac
You can use System Prefernces to open a port on your Mac.
- Open System Preferences
- Navigate to Security & Privacy > Firewall > Firewall Options…
- Select the Plus sign
- Select and application and then click Add
- Make sure Allow incoming connections is on
- Select OK
How do I know if I have any open ports?
If you’re on Windows, there’s an easy tool in the command prompt to show you any open ports.
- Open Command Prompt
- Type in Netstat -ab
Any ports that appear on the list are open ports.
What is an IP address?
An IP address stands for Internet Protocol address, and is a numerical designation that represents a device on a network.
What’s the difference between a port number and an IP address?
Although both port numbers and IP addresses are used to designate devices, they represent different aspects of a connection. The port number specifies where data originates in a specific IP address, and is thus tacked on to the end of an IP address and separated by double colons.
What is a port scanner?
A port scanner is an application that looks for open ports on a server. These tools are often used for penetration testing to improve security, but can often be used for more malicious purposes.