If you’re struggling to run an online game or a piece of software, you may need to open or forward specific ports. As for how to find the port number in the first place, I will tell you just that in this post.
How to find your port number
For a more in-depth explanation with screenshots, refer below for Windows and macOS.
Table of contents
What is a port?
A port is a virtual point in your device where a network connection begins and ends. In contrast to an IP (Internet Protocol) address, a port is specific to the process, not the device. However, they’re both necessary for communication over the internet.
If an IP address is like a building address, a port number is like an apartment number.
Ports represent different processes and services of a device. For instance, apps that use the internet will have different ports than emails or web pages. This allows the device to sort internet traffic in a tidy manner.
So if your IP is 123.6.457.8 and you’re playing a game on Steam, any web traffic related to the game will be marked 123.6.457.8:27000: your IP plus the port number Steam uses for game traffic.
What is my (a) port number?
A port number is a digital label that helps identify different ports inside of a device. Again, it’s like an apartment number appended to the building address that is the IP address.
Since many ports are equally present in different devices, there is no such thing as “my port number.” Just like ports, their numbers are pre-set and don’t belong to anyone.
However, you can still find a full list of ports used inside of your device.
A detailed guide to finding your port number
In short, it takes a single console command to find the full list of your ports and their numbers, all. When you use the “netstat -a” command, you will see a bunch of your IP address variations with port numbers attached to them.
Ports are always displayed with your IP address in front of them. If your IP address is 255.255.255, then an IP port will look something like 255.255.255:46664 (“46664” being the port number).
That’s the short version. And here’s exactly how to find your port numbers on different devices.
How can I find my port number on Windows?
To see your ports and their numbers on Windows, follow two simple steps:
- Step 1: In your Search Box, type in ‘cmd’ and press Enter.
- Step 2: In the console that will appear, type in the “netstat -a” command and press enter to see a full list of your ports and port numbers.
You will find your IP address and port number in the Local and Foreign Address columns.
How do I find my port number on macOS?
You used to be able to scan your device’s ports through a “Network Utility” app on macOS, but Apple recently removed it. To locate your port number on macOS, you need to:
- Step 1: In your Spotlight Search (Command+Spacebar), type in “terminal”.
- Step 2: Type in the command “netstat -an” to see a full list of your ports and their numbers.
If you find multiple sections, look for the Protocol, Local Address, Foreign Address, and State heading.
You will find your IP number paired with a port number under the Local and incoming IP addresses in the Foreign Address columns.
Meanwhile, the Protocol section shows what communication protocol the port is using. This will either be UDP (User Datagram Protocol) or TCP (Transmission Control Protocol).
What’s the difference between TCP and UDP ports?
Ports need to use transport protocols – information transfer methods – to actually send and receive data. Most prominent are the TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).
Their use cases often vary depending on the situation. Here’s how the two compare in a nutshell.
Is connection-oriented, making it stable and more reliable.
Is connectionless, meaning it prioritizes speed.
Three-way handshake makes it safer but slower.
No handshaking makes it less safe and reliable.
Used by the World Wide Web (WWW), email services, file transfer, and some streaming services.
Used for time-sensitive applications and services like streaming, online games, and voice communication apps.
Essential when integrity of the data is more important than speed.
Essential when speed is more important than all the data arriving correctly.
What can I do with a port number?
With a port number in hand, you can:
Maximize your internet speed
Opening and forwarding your ports bypasses some of the resource-consuming processes in the router. This can seriously improve your downloading as well as streaming experiences.
Give games and apps permission to bypass firewalls
Some software or online games can run into problems with your firewall. By knowing their port numbers, you can configure your device to give these ports access to bypass your defenses.
Detect open (vulnerable) ports in your devices or network
Since ports receive information in data packets, the ones left open can act as entry points for hackers. If you’re looking to secure yourself, make sure you don’t have any open ports.
What are Windows/MacOS ports?
Some processes and applications are lucky to have their own permanent ports. Here’s a list:
FTP (File Transfer Protocol) file sharing
SSH (Secure Shell) and other secure communications
SMTP (Simple Mail Transfer Protocol) for email routing
DNS (Domain Name System) or the thing you fiddle with for the most basic internet unblocking purposes
HTTP (Hypertext Transfer Protocol) or, you know, basically how you used to access websites before
IRC (Internet Relay Chat), sort of like primitive Discord
HTTPS (Hypertext Transfer Protocol Secure) or, you know, basically how you access websites today
RTSP (Real Time Streaming Protocol), which is what makes Spotify and Skype streaming go
DOOM, the granddaddy of all online FPS games
How do I know if I have any open ports?
There are many port scanners, both software and online, that can help you check if you have any open ports or if your firewall is blocking any ones you have just forwarded or opened. Using them, you can scan your system for vulnerable ports.
Open port hazard is one of the reasons why most VPNs like Surfshark do not support VPN port forwarding. Your security is our highest priority, so I cannot recommend opening any ports.
But if you’re interested in internet security and privacy, what I can recommend is to check out Surfshark VPN and its many features.
In conclusion: know your ports, keep them closed
Ports are just one of those technologies that work quietly in the background to make online communication work. However, they can also become gaps in your cybersecurity perimeter. That’s why we recommend not leaving any unnecessary ports open – or forward them when you’re using a VPN.
How do I find my IP address and port?
You find your IP address and ports by opening the console, entering the netstat -a command, and then looking for the numbers under Local Address.
What port number is 8080?
8080 is the port number usually used by web servers.
What port does IP use?
Philosophically speaking, IP either doesn’t use any port or uses every port. The closest thing to an answer here would be 443, the port used by HTTPS, the protocol that handles most website traffic these days.