VPN Security, Protocols & Post-Quantum

Background

What is port forwarding in a VPN and who needs it

Port forwarding in a VPN opens a single external port on the public IP address of the VPN server and passes everything that arrives on that port through the tunnel to the user's device. The feature is only needed when someone on the outside starts the connection: a peer when seeding a torrent, a player running their own game server, or the owner of a home media server who logs into it while travelling. For browsing, watching BBC iPlayer or Netflix and ordinary file downloads, forwarding is not needed.

From VPN Security, Protocols & Post-Quantum — Last reviewed

Proton VPN, Windscribe, AirVPN and PureVPN all document this feature, but their conditions differ. The key distinction is whether the port number changes after reconnecting.

Understand how a VPN server lets an incoming connection through

A single public address of a VPN server is shared by many clients. By default, the server's firewall discards unsolicited incoming packets, because the server does not know which client they are addressed to. Outgoing connections work as usual: the response returns over an already established session.

Forwarding assigns one external port to a specific client, and the server begins passing traffic from that port into the correct tunnel. Proton VPN describes the feature like this: it “allows incoming connections from the internet to reach your device through Proton VPN's firewall”, that is, it lets incoming connections from the internet through to the device past the provider's firewall. The server picks a random port number and opens it for incoming traffic. Hence a practical condition: a program must be running on the device that listens on exactly this port. Without it, the forwarded port is useless.

Decide whether you need port forwarding: torrents, gaming, home servers

We separate these tasks by a single criterion: who starts the connection.

ScenarioIs forwarding neededMechanismWho offers it (per documentation)CitadelVPN: what is useful
Seeding torrentsDesirable: peers connect on their ownThe forwarded port is entered in the torrent clientProton VPN (paid plans, P2P servers), Windscribe (Ephemeral, 7 days), AirVPNKill switch (enabled by default, according to the company), split tunnelling by app
Game server, self-hostingYes, better with a permanent portIncoming forwarding at the VPN provider; the server program listens on the matching local port; stability of the external address and port number is checked separatelyAirVPN (reserved ports for as long as the subscription lasts), Windscribe (a permanent rule when buying a Static IP)Split tunnelling by app: the server process runs outside the tunnel if the port is forwarded on your router with an external address (an example scheme)
Remote access to a home networkYes, or a workaroundForwarding on the VPN server or on your own router (an externally reachable address is required); with CGNAT — a mesh network such as TailscaleWindscribe describes this scenario outrightSplit tunnelling by site or app — for the scheme with forwarding on your own router; with CGNAT a mesh network is required
Streaming and browsingNoOutgoing connections onlyAny VPNNetflix, BBC iPlayer

Torrents and seeding

You can download files without port forwarding: the client connects by itself to peers that accept incoming connections. Seeding is harder. Two peers with closed incoming ports cannot connect to each other, so the swarm reaches fewer people. A detailed breakdown appears in our piece on whether port forwarding is necessary for torrenting. On Proton VPN, port forwarding works only on servers marked P2P, and the tunnel itself runs over WireGuard or OpenVPN.

Game server and hosting

Gamers need an address and a port that do not change every evening. A temporary port is inconvenient here: after every reconnection, a new number has to be sent out to players all over again. A static or dedicated IP does not open a port by itself: a permanent address and a permanent forwarding rule are different characteristics. For hosting, three conditions must come together: the provider supports incoming forwarding, the server program listens on the matching local port, and the stability of the external address and port number is checked separately. Windscribe gives you a permanent forwarding rule when you buy a Static IP, while AirVPN reserves ports against your account for as long as the subscription lasts.

Home network, media server and CGNAT

Windscribe positions forwarding as a way to gain remote access to resources on your home network safely. There are three ways to reach your own server from outside, and each has a different point of entry.

SchemePoint of entryNecessary conditionsDoes access go through the provider's VPN
Forwarding on the VPN serverThe public IP address and port of the VPN serverThe provider supports the feature, a port has been assigned, a program on the device listens on that portYes
Forwarding on the home routerThe external address of the home routerThe provider issues an externally reachable address (not CGNAT), a forwarding rule on the router, a program listening on the portNo
Mesh network such as TailscaleThe nodes of the mesh networkTailscale installed on the server and on the device you connect fromNo

Some internet providers keep their subscribers behind CGNAT, that is, behind a shared address, and then the second scheme is impossible: you will not be able to forward a port on the home router. In this situation users make do with the Tailscale mesh network. Split tunnelling in any VPN changes only the routing of an app's traffic: it does not create an incoming port and does not get around CGNAT. We examined the risks of each scheme in our article on port forwarding for a home media server.

Understand temporary vs reserved ports

The procedure depends on the provider. As Top10VPN notes, some services let you enable port forwarding straight in the app, while others first require you to sign in to your account on the website. AirVPN belongs to the second group.

ProviderForwarding supportPort lifetimeConditions
Proton VPNA toggle in the app (Windows, Linux, macOS in early access), P2P servers onlyA random port, usually changes on reconnectionPaid plans, incompatible with NAT type 2 (moderate)
WindscribeTemporary rules on all servers and permanent ones with Static IPEphemeral for 7 days, a permanent rule when buying Static IPEphemeral only on the Pro plan (monthly or annual), not available in Build-A-Plan
AirVPNReserved portsReserved for as long as the subscription lastsConfigured via the account section of the website
PureVPNLocations that support the feature, or a dedicated IP to which the feature is attached separatelyAttached to a supporting location or to a dedicated IP with the feature attachedConnecting to a supporting location

With Proton, forwarding is switched on with the Port forwarding On toggle, and the active port number appears beneath the button. That number has to be entered into the client. Besides its apps, the company documents manual configuration through OpenVPN and WireGuard files. Windscribe confirms two types of forwarding: a temporary rule on all servers lasting 7 days, and a permanent one tied to a static IP. In the itechguides comparison, AirVPN has the most clearly documented set-up with reserved ports.

Those already choosing a service for P2P may find our breakdown of a VPN for torrenting with a kill switch and port forwarding useful.

Check that the port is actually open

  1. Take the port number issued by the provider and enter it in the torrent client or the server settings.
  2. Run a service on the device that accepts incoming connections (a TCP listener), and keep it running during the test.
  3. Test the port with an external port checker.

Weigh the speed impact and the risks of an open port

Does forwarding affect speed

The bandwidth of the tunnel does not change because of forwarding. What does happen is that peers which previously could not connect now start doing so. Top10VPN writes that for torrents this can noticeably raise download and upload speeds thanks to direct connections. As for games, itechguides notes that providers' documentation gives no confirmed measured gains.

Risks of an open port

An open port becomes one more way into the device. Top10VPN advises opening only the ports you need and closing them after use, setting strong passwords on game servers and remote desktops, updating software promptly, and never publishing your IP and port number on forums. More on this in our piece on whether port forwarding through a VPN is safe.

Port forwarding vs dynamic port forwarding

Dynamic port forwarding belongs to a different technology: an SSH client with the -D flag brings up a local SOCKS proxy, and outgoing traffic leaves through it. It opens no incoming connections from outside. We covered the configuration in our guide to dynamic port forwarding.

Pick a service for your specific task

  • If, when seeding and downloading, it matters that the client does not go online from the real IP if the tunnel drops, and you need to choose which apps go through the VPN — CitadelVPN (kill switch by default, split tunnelling).
  • If you need forwarding directly in the app and a change of port on reconnection does not bother you — Proton VPN on a paid plan.
  • If you need a permanent port for a game server or hosting — AirVPN with reserved ports (for as long as the subscription lasts) or Windscribe with a permanent rule when buying a Static IP.
  • If your home provider keeps its subscribers behind CGNAT but you need access to your own network — a mesh network such as Tailscale.

Frequently asked questions

Do free VPNs have port forwarding?

According to Top10VPN, not a single free VPN supports forwarding. The feature exists only on paid subscriptions, and some providers charge extra for it. Proton VPN likewise offers it only on paid plans.

Does forwarding work with any torrent client on Windows?

Proton VPN states that forwarding works with any BitTorrent client, and provides instructions for popular programs on Windows. There is one condition: the port number from the VPN app must match the port in the client's settings.

Further sources

  1. describes the feature like this, protonvpn.com
  2. a permanent forwarding rule, windscribe.com
  3. AirVPN, airvpn.org
  4. positions forwarding, windscribe.com
  5. make do with the Tailscale mesh network, reddit.com
  6. Top10VPN, top10vpn.com
  7. itechguides, itechguides.com
  8. PureVPN points this out, support.purevpn.com

Read next