Ports, TCP, UDP, protocols, a bunch of numbers, what do all of these means? You’ll find your answers below – including the relevance of your VPN port number.
- What is a port?
- What is the difference between port numbers?
- TCP and UDP: What are they used for?
- Why do you need to know your VPN port number?
- What ports are used by your VPN service?
- How to find your VPN port number
- In conclusion
What is a port?
Your device’s IP address is often compared to the address of an apartment complex. If we follow that same analogy, then a port is like the address to a specific apartment within the complex. Each port handles a different part of the network communications going through your device.
For example, port 80 is used for HTTP and port 443 is used for HTTPS, the secure version of HTTP. These two protocols are tasked with “delivering” websites to your device and use those specific ports to do so.
What is the difference between port numbers?
Port numbers range between:
- 0 and 1023 for well-known ports – reserved for privileged services (e.g. HTTP, HTTPS, FTP, and more)
- 1024 to 49151 for registered ports – different companies may register their software protocols to these ports (e.g. port 1119 for Battle.net chat/ game protocol, used in Blizzard Entertainment games)
- 49152 to 65536 for dynamic (or private) ports – can be freely used by anyone
Now, a piece of software can use more than one port simultaneously, one for each specific protocol in its structure. The same applies to VPNs and VPN protocols. For example, the IKEv2/ IPSec protocol uses UDP port 500, while its NAT Traversal component uses UDP port 4500.
TCP and UDP: What are they used for?
As with the example above, you’ll often see port numbers used in conjunction with the Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP). Both of these protocols serve pretty much the same purpose: to send data packets over a network connection.
What is the difference between TCP and UDP?
The difference between the two protocols lies in one key area: error-checking. TCP constantly checks that each data packet was sent correctly, while UDP simply continues the data stream without bothering to check for transmission errors.
As such, TCP may be used in scenarios where it’s essential to receive the data fully intact – such as in chat programs, or sending files over the Internet. After all, you wouldn’t want only bits and pieces of your messages or work files to reach their destination.
In contrast, UDP is used where complete data integrity isn’t necessary (such as watching a video on YouTube). Without TCP error-checking, the worst that could happen is sudden dips in video quality.
At the same time, using UDP may result in faster connection speeds, as the data packet verification process is skipped entirely. Then again, if you experience frequent network drop-outs, then using TCP may result in a more reliable connection.
Why do you need to know your VPN port number?
One thing you can do if you know the port numbers for your network-capable software is to set up firewalls and change app connection permissions.
Now, the average person will never have to deal with the VPN port number. However, it may be useful to know in case your firewall is configured to block connections to a port used by your VPN client.
Similarly, you may get around firewalls used by public institutions (such as your college campus or workplace) by switching your VPN protocol. Why? Well, each protocol uses one or more different port numbers, as mentioned. If your VPN doesn’t seem to work, the firewall may be blocking that specific VPN port number.
Finally, you may fix issues with downloading or uploading torrents (or using any other P2P apps) via VPN, by using VPN port forwarding. Read more about the process in our in-depth port forwarding guide.
What ports are used by your VPN service?
You can find the default VPN port number used by each protocol in this VPN protocol guide. It also contains information about any auxiliary port numbers in use. For instance, the fact that the IKEv2/ IPSec and L2TP/ IPSec protocols use UDP port 4500 for NAT traversal.
Now, each VPN provider may use a different port configuration for their encryption protocols. OpenVPN in particular can be configured to run on any port. You may find which ports your VPN uses by checking your VPN client’s connection settings.
Take Private Internet Access (PIA) and IPVanish for example. The latter only allows OpenVPN connections over TCP or UDP ports 443 or 1194. Meanwhile, this is the config used by PIA:
- UDP ports 1194, 1197, 1198, 8080, 9201 and 53
- TCP ports 502, 501, 443, 110, and 80
Your provider may also list this information on their website. If all else fails, you may need to ask VPN customer support for help. For your convenience, here are ten VPNs that have 24/7 live chat support.
How to find your VPN port number
For a list of currently active ports, you may use the following commands (or apps where system commands are unavailable):
Windows
- Open a command prompt (press the Windows key + R, type “cmd” and press Enter).
- Type “netstat -a” and press Enter.
Mac
- Open a command prompt (Click on the Go menu -> Utilities -> double-click Terminal).
- Type “netstat -a” and press Enter.
Linux
- Open a command prompt (most Linux distros use the same default keyboard shortcut: Ctrl + Alt + T. Alternatively, click “Activities” in the top left corner of the desktop, then click “Terminal”).
- Type “netstat -a” and press Enter.
In each case, you can see a list of active connections, the connection type (TCP or UDP), and other information (such as your device’s private IP address and active port number(s))
Android and iOS
There is no built-in command to check active ports on these two mobile operating systems. However, you may use the port-checking function in a free app like Fing to find out which ports are open and what their role is. Here is a quick guide.
In conclusion
Knowing your VPN port number serves a few particular purposes, such as being used in port forwarding or getting around irritating firewalls in public spaces. Otherwise, you won’t really run into many situations where it’s relevant.
Leave a Reply