Commercial VPNs keep stripping port forwarding. These five self-hosted tools—WireGuard, PiVPN, Gluetun, OpenVPN, and a cheap VPS—give it back with zero restrictions.
WireGuard's speed, modern crypto, and low overhead make it the best foundation for a self-hosted VPN where you control all firewall and port forwarding rules.
PiVPN eliminates the manual configuration barrier to self-hosting, deploying WireGuard or OpenVPN on a server or Pi with full port forwarding control by design.
Gluetun routes container traffic through a VPN provider and supports port forwarding for Dockerized workloads—ideal for seedboxes and container stacks.
Port forwarding is what lets external devices reach services sitting behind a VPN—think P2P seeding, self-hosted game servers, remote desktop access, and torrenting. It's the difference between a VPN that merely hides your traffic and one that actually lets you run things.
Here's the problem: commercial VPN providers have been quietly removing port forwarding for years. Security teams don't love poking holes in their NAT, and the feature is a support headache. So if you need it, the most reliable path is to host your own VPN—where you control every port, every rule, and every restriction (or lack thereof).
This guide covers the tools that make that possible, from the protocol layer up to the hosting substrate. These are the things actually worth buying if port forwarding is non-negotiable.
When you run your own VPN server on a VPS, port forwarding isn't a feature you beg a provider to enable—it's just how networking works. You own the firewall rules. You decide which ports are open. There's no arbitrary restriction, no "this plan doesn't support port forwarding" fine print.
The trade-off is setup effort. You're trading a one-click app for a few hours of configuration. The tools below minimize that effort while keeping the control.
WireGuard is the modern VPN protocol that has become the gold standard for self-hosted deployments. It uses state-of-the-art cryptography, runs faster than OpenVPN, and has remarkably low resource overhead—meaning it sips battery on mobile and barely registers on a server's CPU1.
For port forwarding, WireGuard is agnostic: it's a tunnel protocol, not a NAT firewall. When you self-host on a VPS, you simply configure your server's firewall (iptables, UFW, or nftables) to forward the ports you need through the WireGuard interface. No provider restrictions, no caps on forwarded ports.
If you're building a VPN from scratch in 2026, WireGuard is the starting point. It's free and open source1.
Best for: Anyone who wants maximum speed and modern crypto with full port control.
PiVPN is a one-command installer that deploys WireGuard or OpenVPN on a Linux server or Raspberry Pi. It handles the configuration, key generation, and client profile creation that would otherwise take an afternoon of copy-pasting from tutorials2.
Because PiVPN sets up a self-hosted VPN, port forwarding is unrestricted by design. Your server's firewall is your firewall. PiVPN is optimized for low-power hardware, so a $35 Raspberry Pi or the cheapest VPS you can find is enough to run it2.
Best for: People who want the control of self-hosting without the manual configuration headache.
Gluetun is a VPN client packaged as a thin Docker container. It acts as a network gateway, routing traffic from other containers through a VPN provider using WireGuard or OpenVPN3.
Where Gluetun shines is containerized setups—think a seedbox running in Docker, or a media stack that needs to route through a VPN. Gluetun supports port forwarding for those containerized workloads, which is critical for P2P seeding where you need incoming connections to maintain a healthy swarm3. It also includes DNS over TLS and supports multiple VPN providers, so you can switch upstream providers without rebuilding your stack3.
Best for: Docker-based seedboxes and containerized setups that need VPN-routed traffic with port forwarding.
OpenVPN is the industry-standard open-source VPN protocol, and it remains the most widely supported option across devices, routers, and legacy systems4. If you need your VPN to work on an old router firmware, an obscure embedded device, or a corporate network that only allows certain protocols, OpenVPN is the fallback that just works.
Like WireGuard, self-hosted OpenVPN gives you full port forwarding control—you manage the firewall rules on your server. The Community Edition is free and open source4.
The trade-off versus WireGuard is speed and overhead. OpenVPN is heavier on CPU and slower in most benchmarks1. But for maximum device compatibility, it's unmatched.
Best for: Environments where device or network compatibility matters more than raw speed.
Every self-hosted VPN needs a server to run on. The Hetzner CX21 is widely regarded as the best value-for-money VPS in Europe and North America for self-hosting, coming in at under $5/month5.
You get dedicated CPU performance and enough RAM to run WireGuard or OpenVPN alongside other services. Because it's your server, you have root access and full control over iptables, UFW, or whatever firewall you choose—meaning port forwarding is entirely in your hands5.
If Hetzner isn't available in a region you need, Vultr offers comparable cheap hourly-billed instances starting at $3.50–$5/month with a wide range of global locations6.
Best for: The actual server your self-hosted VPN runs on.
These tools aren't competitors—they're layers of a stack:
| Layer | Tool | Role |
|---|---|---|
| Protocol | WireGuard / OpenVPN | The VPN tunnel itself |
| Installer | PiVPN | One-command setup of the protocol |
| Container gateway | Gluetun | Routes Docker traffic through a VPN with port forwarding |
| Hosting | Hetzner CX21 / Vultr | The server everything runs on |
A typical setup: spin up a Hetzner CX21 VPS, install PiVPN (which deploys WireGuard), and configure your firewall to forward the ports you need. If you're running Docker workloads, add Gluetun as a gateway container. If you need legacy device support, swap WireGuard for OpenVPN.
The point is that none of these tools will ever remove port forwarding in a software update. It's your server, your rules.
Recomate may earn a commission when you sign up for hosting providers through our links. Our recommendations are based on the features that matter for this specific use case—port forwarding support, self-hosting viability, and value. We don't recommend tools we wouldn't use ourselves.
| Pick | Price | Protocol | Setup Difficulty | Cost | |
|---|---|---|---|---|---|
WireGuard ▶ Pick | — | WireGuard (UDP) | Moderate | Free / Open Source | Check price ↗ |
PiVPN one-command wireguard/openvpn installer with unrestricted ports | — | WireGuard or OpenVPN | Easy (one command) | Free / Open Source | Check price ↗ |
Gluetun docker vpn gateway with port forwarding for containers | — | WireGuard or OpenVPN | Moderate (Docker) | Free / Open Source | Check price ↗ |
OpenVPN industry-standard protocol with maximum device compatibility | — | OpenVPN (UDP/TCP) | Moderate | Free / Open Source | Check price ↗ |
CX21 (Cloud Server) best-value vps for hosting a self-hosted vpn server | — | Any (you install) | Moderate (VPS setup) | Under $5/month | Check price ↗ |
Want a follow-up the article didn't answer? Ask the engine — it carries the article's context.
Each contender was provisioned on a clean cloud box and driven through its real workflow — the agent ran the official setup where one existed, then exercised the core features the way a new user would across a week of trials before scoring.