
Gluetun Port Forwarding Guide
Need inbound connections through the tunnel? This Gluetun port forwarding guide explains what it does, which providers support it, and how to feed the forwarded port to your apps.
What Port Forwarding Does
By default a VPN only allows outbound connections. Port forwarding asks the provider to open an inbound port that maps back to your tunnel, which is useful for peer-to-peer apps and self-hosted services that need to be reachable.
Which Providers Support It
- Providers like Private Internet Access and ProtonVPN offer forwarding.
- Gluetun requests the port automatically when the feature is enabled.
- The assigned port can change after a reconnect, so don't hard-code it.
Using The Forwarded Port
Gluetun writes the current forwarded port to a file and exposes it via the control API. Apps that support dynamic ports can read it directly; others may need a small script to update their config on change.
Routing an app through Gluetun first? Our Docker Compose guide shows exactly how.
Troubleshooting Forwarding
If inbound connections fail, confirm your provider actually supports forwarding, that the feature is enabled, and that your app is using the current port. Our troubleshooting guide covers the rest.
Summary
Port forwarding unlocks inbound traffic through the VPN on supported providers. Keep the port dynamic and let Gluetun manage it. New here? Start with our beginner's guide.