Top10VPN is editorially independent. We may earn commissions if you buy a VPN via our links.
What Is VPN Port Forwarding & Which VPNs Offer It?
Simon Migliano
Simon Migliano is a recognized world expert in VPNs. He's tested hundreds of VPN services and his research has featured on the BBC, The New York Times and more. Read full bio
VPN port forwarding routes inbound traffic through a specific port, allowing external devices to bypass your NAT firewall and directly connect to computers on your local network. This can improve performance for activities like online gaming, torrenting, and other P2P file-sharing while using a VPN. Private Internet Access and AirVPN are 2 of the best VPNs with port forwarding.
Port forwarding is often misunderstood and only available on a very few of the top VPN services.
Contrary to information online, even top VPNs, like ExpressVPN, do not support port forwarding. Though it claims to work on its router app, we found this only allows you to remotely access files on your local network, and won’t enhance your torrenting or gaming activity in any way.
Additionally, very few VPN providers offer good customization options and the option to forward multiple ports.
We’re fully independent and have been reviewing VPNs since 2016. Our advice is based on our own testing results and is unaffected by financial incentives. Learn who we are and how we test VPNs.
VPNs Tested
61
Total Hours of Testing
30,000+
Combined Years of Experience
50+
What Is Port Forwarding & How Does It Work?
SUMMARY: Port forwarding allows external networks to access computers on a private local area network (LAN).
It works by creating an association between the public WAN IP address and port of the network router and the internal LAN IP address and port of a device.
Every LAN router has a NAT (Network Address Translation) firewall that controls traffic and protects your home devices from security threats.
This firewall allows all devices on your local network to share the same external IP address.
NAT firewalls come in three types: Open, Moderate, and Strict, which determine how accessible your local network is to external connections.
An example of an Open NAT type on Xbox.
While a strict NAT type offers security benefits, it can make it harder for external devices to communicate with specific devices on your network, particularly for peer-to-peer connections.
This can impact activities like seeding torrents and participating in multiplayer games.
You can solve this problem by opening router ports. These ports route external traffic to individual devices on your local network, and vice versa.
Port forwarding involves manually opening and assigning a port to certain types of network traffic, allowing external computers to access specific devices within your LAN.
Port forwarding allows you to bypass limits imposed by the NAT firewall, improving the speed of some applications and enabling other services, such as remote desktop access.
While there are other methods to bypass or change your NAT type, such as using UPnP (Universal Plug and Play) or a Windows 10 Hotspot, port forwarding remains the most popular approach.
Generally, ports are assigned to specific types of activity. For instance, websites use ports 80 and 443, and email uses port 25.
Only the ports your router uses are kept open, meaning traffic directed to the wrong port will be automatically blocked by the router’s firewall. By default, all of your router’s ports should be closed.
Port forwarding allows devices on the internet to access specific devices within your local area network.
Port numbers for commonly used services are assigned by the Internet Assigned Numbers Authority (IANA). Here’s a list of some common NAT ports and their uses:
Port Number
Service
20
FTP (File Transfer Protocol) data transfer
21
FTP (File Transfer Protocol) control
22
SSH (Secure Shell encryption)
25
Email
53
DNS (Domain Name System)
80
HTTP (Hypertext Transfer Protocol i.e. web pages on the internet)
110
POP3 (Post Office Protocol) – Used to retrieve email
193
Internet Relay Chat (IRC)
443
HTTPS (Encrypted web pages)
5060
SIP (Session Initiation Protocol) – used in VoIP (Voice over Internet Protocol) devices
Different Types of Port Forwarding
Computer networking employs several types of port forwarding. Your choice depends on your access to the external device and your specific goals.
The three types of port forwarding are:
Local port forwarding. The most common, where a local port is forwarded to a remote host. This reroutes traffic from your device to another, often using SSH encryption. It allows you to bypass your firewall and access services available to an intermediary device or server, but not directly to you.
Remote port forwarding. Here, a remote port is forwarded to a local host. This enables connections to your device from the server-side of a tunnel, such as SSH. It’s commonly used for remote desktop access and server hosting, though it may pose security risks.
Dynamic port forwarding: Functioning like a proxy, this allows you to bypass your server’s firewall by connecting to a trusted third-party server or device. Unlike local and remote forwarding, the port number is assigned dynamically at connection.
VPN port forwarding usually involves either remote port forwarding or dynamic port forwarding.
What Is VPN Port Forwarding Used For?
When you connect to a VPN service, the VPN server acts like a router for your computer. Just like a router, it channels your traffic through ports.
However, unlike a home router, most VPN services do not allow you to forward traffic to specific ports.
Unless you choose a VPN with port forwarding, the port will usually be chosen automatically.
The reasons for port forwarding while connected to a VPN are very similar to those without a VPN:
Multiplayer Gaming
Gaming is one of the most popular uses for port forwarding, especially if you use a VPN for gaming. That’s because port forwarding allows you to bypass the firewall on your VPN or local network.
If your VPN has a strict NAT type by default, it may prevent incoming P2P connections from functioning properly. Because dynamic VPN IP addresses change, they can also make it impossible to host a game server.
If you have a strict firewall, you won’t be able to host a game server, and you may experience extra lag or ping. In some cases, peer-to-peer (P2P) hosted online games may simply not work at all.
The Port Forwarding menu of a Linksys router.
Port forwarding on a static IP address can fix these problems bypassing your router or VPN firewall. Specific games may require specific ports, so you should consult online forums and guides before beginning.
You can port forward on most games consoles and devices, including Xbox Series X|S, PS5, Nintendo Switch and PC.
Torrenting & Other P2P Activities
By default, VPN services reject incoming connections to your torrenting client or P2P application. This can slow down file sharing and make it difficult or impossible to seed torrents.
Port forwarding allows your torrenting client to receive the necessary data packets to connect directly to other users’ torrenting clients and seed the torrent. As a result, port forwarding can have a significant impact on your torrenting performance.
PIA port forwarding can be set up with one click from within the app’s settings menu.
This doesn’t only apply to torrenting, but also to P2P connections in video games. For this reason, many of the best torrenting VPNs offer some kind of port forwarding feature.
Remote Desktop Access
VPN services can sometimes interrupt remote desktop access. Port forwarding allows you to establish a direct connection between your local device and the remote device you want to access, without being interrupted by your VPN’s firewall.
You should only do this if you completely trust the remote device, as a malicious actor could use it to gain direct access to your computer.
Hosting a Website
If you want to host a website from a device while connected to a VPN, you will need a port forward to direct traffic from the internet to a specified port in your local client, which is running the web server software.
Without a port forward, it won’t be possible for users outside of your local network to access the website. You’ll also need to configure a public domain name to point at your VPN IP address.
Is Port Forwarding with a VPN Safe?
Port forwarding is safe if implemented correctly. However, it’s important to remember that ports are a direct route to your device, and forwarding them makes it easier to access to your machine from outside your network.
The feature selectively disables your NAT Firewall, which normally functions to keep your device safe from the wider internet.
Port forwarding — whether used with or without a VPN — therefore comes with some serious security considerations.
Unless they are managed carefully, open ports can be exploited by hackers and malicious third parties to steal your data or even hijack your device.
Port forwarding can also cause IP leaks when torrenting. It’s essential that you check for data leaks before connecting to any publicly visible torrents, as this is both a privacy and security risk.
How to Enable Port Forwarding on Your VPN or Home Router
In this section, we’ll explain exactly how to set up port forwarding on your home router or VPN software. Once this is set up, you’ll need to take extra steps to ensure you minimize the inherent risks of port forwarding.
How to Set Up Port Forwarding on a Home Router
How you set up a port forward will vary slightly by router model. The following instructions apply to most modern routers.
Watch this short video to see how to set up a port forward on a Virgin Media router:
How to set up port forwarding on a Virgin Media router.
Here’s how to set up port forwarding on a home router:
Enter your router’s IP address into your web browser’s address bar.
If you receive a security warning, click continue and log in to your router.
Navigate to your router’s advanced settings menu.
Under port forwarding, create a new rule.
Type in the local IP address for your computer/device.
Type in the port number you want to open/forward.
Select the protocol you want to use (normally TCP/UDP or both).
Select Enabled On.
Click Add rule.
Your new port forward rule should now be set up.
How to Set Up Port Forwarding on a VPN
The port forwarding process varies far more between VPN services than it does between routers.
Some VPN services allow you to enable port forwarding directly in the VPN software itself, while for others you must log into your account on the provider website and set your configuration there.
If you’re not sure, check with your provider’s customer support to see which method your chosen service uses.
Configuring Port Forwarding in the VPN App
Watch the video below for a demonstration of how to set up port forwarding with Private Internet Access, which is done entirely via the app settings menu. Other VPNs with in-app port forwarding will have a similar process.
How to set up port forwarding with PIA.
Here’s a recap of how we enabled port forwarding in the PIA app:
Open the PIA app.
Tap Settings > Network.
Check Request Port Fowarding.
Connect to a VPN server.
Copy the port number that’s visible under the VPN IP address in the app’s main view.
In the settings of the external software that requires a port forward, paste that port that number where you set the Listening Port.
Configuring Port Forwarding on the VPN’s Website
Other VPNs, such as AirVPN, require you to open ports via your account area on their website.
Watch the video below for to see of how to set up port forwarding with AirVPN. Other VPNs with web-based port forwarding will have a similar setup.
How to set up port forwarding with AirVPN.
Here’s a recap of how we set up port forwarding through AirVPN’s website:
Click ‘Request a new port’ to have AirVPN pick an available port for you, or manually enter one into the text field if you have a preferred option.
Leave the options, including protocol choice and IP layer as they are.
Copy the port number and paste it into the Listening Port field of your torrent client, or other external software requiring port forwarding.
How to Port Forward Safely
If you are careful not to open more ports than necessary and you follow the safety tips below, it is very unlikely that you will be subject to an attack.
Port forwarding can be made safer by taking the following precautions:
Follow basic security practices. Set strong passwords and change them regularly, especially for game servers. Keep your device’s software up to date to patch known vulnerabilities.
Keep port forwarding details private. Never share your public IP address or port number with untrusted individuals or on public forums.
Limit open ports. Only forward the ports you need. More open ports increase your exposure to potential threats. This is why we recommend you avoid using a VPN with all ports open, or the option to open all ports.
Protect your anonymity. VPN port forwarding can compromise privacy, as your ports and static IP address are linked to you. Use private payment methods and regularly change which public port number is being forwarded.
Which VPNs Allow Port Forwarding?
Because of the security vulnerabilities associated with port forwarding, most VPNs do not allow it on their network. In fact, out of the 61 VPNs we have reviewed, only 12 VPNs offer port forwarding.
Here is an updated list of VPN services that offer a port forwarding feature:
AirVPN: Allows up to 20 port forwards and dynamic DNS, configured via the AirVPN website.
Astrill: Supports WireGuard and OpenVPN port forwarding on specific servers, marked with a star in the VPN client.
AzireVPN: Allows up to 5 port forwards per server on WireGuard connections.
Hide.me: Supports Up to 10 dynamic port forwards.
Perfect Privacy: Up to three dynamic and five static port forwards, via OpenVPN.
Private Internet Access: Supports one dynamic port forward via OpenVPN or WireGuard.
PrivateVPN: Allows one open port per server, chosen automatically.
PureVPN: Port forwarding is available but only through PPTP, which is not safe to use.
TorGuard: Allows up to 10 port forwards via OpenVPN or WireGuard.
Trust.zone: Port forwarding is enabled, but only in some countries.
VPNSecure: Available on dedicated IP connections via OpenVPN IPv4 or IPv6.
Windscribe: Available with a static IP address add-on.
All of these VPNs only offer port forwarding on premium subscriptions, and in some cases they even require an additional fee. This means there are no free VPNs that support port forwarding.
Many popular paid services – including NordVPN and ExpressVPN – block access to all ports except those that are absolutely necessary for the VPN to function.
For a VPN to support the secure forwarding of multiple ports, it needs to have both static IP addresses and the capacity for constant technical attention. As a result, only smaller and more technically-oriented VPNs tend to have it as an option. Even then, it is often limited in functionality.
The Best VPNs with Port Forwarding
The best VPNs for port forwarding allow users to set multiple port forward rules simultaneously. You should have a degree of choice over which port numbers to use, and on which servers.
As always, VPNs for port forwarding also need to be secure services with strong encryption, no-logs privacy policies, and fast speeds.
Here’s a table comparing the best port forwarding VPNs in 2024 based on our testing criteria:
Very flexible with extensive customization options
Experienced community & excellent support resources
New users limited to 5 ports
Not very user-friendly software & website
Can be overwhelming to less technical users
AirVPN is the best VPN for port forwarding. For new users, it offers up to five remote port forwards on all of its servers, via WireGuard or OpenVPN connections.
If you have an account created before June 2023, even if the subscription has lapsed, then you can forward up to 20 ports concurrently.
While on the face of it, this might seem a frustrating change for new users, five ports is still more generous than most other VPNs and more than enough for most people.
Our review of AirVPN also measured very fast upload and download speeds for torrenting.
Unlike other VPN services, AirVPN allows users to request any port over 2048.
It is also possible to remotely map forwarded ports to a different local port below this range.
AirVPN’s port forwarding has to be configured through its website.
In addition to the 5/20 permanent port forward rules offered by AirVPN, it also offers a dynamic port forwarding option.
We found this was notably slower compared to PIA and PrivateVPN, which offer the convenience of setting up port forwards directly within their apps.
AirVPN is intended for experienced or advanced VPN users, which means it can feel difficult to use at times. You’ll need some technical knowledge to make use of its port forwarding feature, but the VPN’s support forums are helpful and well-maintained if you come across any problems.
The port is randomly assigned, so it may not work for all applications. However, it will enable you to bypass your NAT firewall.
One upside of randomized port numbers is that it better for anonymity, making it harder for bad actors to target you.
PIA’s port forwarding feature can be quickly enabled within its app.
As you might expect from an app that’s very easy to use, port forwarding is simple and intuitive to set up on PIA.
Once toggled on from the settings menu, port forwarding will automatically be active whenever you connect to a compatible server.
It’s easy to use once enabled, too. You only need to copy the port number into the external application that you want forwarded, such as your torrenting software.
Another plus is that PIA supports port forwarding on both of its available protocols, OpenVPN and WireGuard.
PIA doesn’t offer the same number of port forwarding options as AirVPN or Hide.me, and it won’t allow for the same number of forwarded ports simultaneously. However, our PIA review found that it outperforms both these VPNs in other areas, including overall security, speed, and streaming.
If you need a VPN for other areas as well as port forwarding, PIA is the best option.
Once you connect to a VPN server, PrivateVPN automatically assigns you a specific port.
This doesn’t require any prior setup or further configuration, making PrivateVPN an ideal choice for VPN beginners.
It’s possible to forward ports on all 200 of PrivateVPN’s servers, regardless of location. However, it can only be done on OpenVPN connections as PrivateVPN doesn’t support WireGuard.
PrivateVPN automatically port forwards, by default.
Another drawback is that PrivateVPN only offers one remote port forward at a time, which changes every reconnection.
The service does at least provide a dynamic port forwarding feature. This can easily be activated by selecting a dedicated IP from the server list.
In our PrivateVPN review, we found that these servers are owned and controlled by PrivateVPN. This is a welcome layer of privacy and security, especially for torrenting.