docker run -it --rm --cap-add=NET_ADMIN -e VPN_SERVICE_PROVIDER="private internet access" \
-e OPENVPN_USER=abc -e OPENVPN_PASSWORD=abc \
-v /yourpath/gluetun:/gluetun \
-e SERVER_REGIONS=Netherlands qmcgaw/gluetun
version: "3"
services:
gluetun:
image: qmcgaw/gluetun
cap_add:
- NET_ADMIN
volumes:
- ./gluetun:/gluetun
environment:
- VPN_SERVICE_PROVIDER=private internet access
- OPENVPN_USER=abc
- OPENVPN_PASSWORD=abc
- SERVER_REGIONS=Netherlands
VPN_SERVICE_PROVIDER=private internet access
OPENVPN_USER
OPENVPN_PASSWORD
SERVER_REGIONS
: Comma separated list of regionsSERVER_NAMES
: Comma separated list of server namesSERVER_HOSTNAMES
: Comma separated list of server hostnamesPORT_FORWARD_ONLY
: Set totrue
to select servers with port forwarding onlyPRIVATE_INTERNET_ACCESS_OPENVPN_ENCRYPTION_PRESET
: Encryption preset, defaulting tostrong
, which can be set tonormal
,strong
ornone
.⚠️ none
disables thecipher
andauth
OpenVPN options.VPN_ENDPOINT_PORT
: Custom OpenVPN server endpoint portVPN_PORT_FORWARDING
: defaults tooff
and can be set toon
to enable port forwarding on the VPN serverVPN_PORT_FORWARDING_STATUS_FILE
: File path to write the forwarded port number to. It defaults to/tmp/gluetun/forwarded_port
.
💁 For now, native support cannot be added, but this is a slow work in progress.
In the meantime, @Kieros proposes to use kylegrantlucas/pia-wg-config to extract a Wireguard configuration file which you can then use with the custom provider.
For VPN server port fowarding with Wireguard, please subscribe to gluetun/issues/2320 to be alerted when this is implemented and working.
In my experience, port forwarding with PIA is not really working for some reason. It seems to only work for p2p applications, PIA might be doing deep packet inspection on the forwarded port.
From @ddelange on issue #464, further confirming this:
PIA replied that their service does not support incoming connections over a forwarded port. I also don't understand the answer (I was asking specifically about hosting a webserver on the forwarded port), because incoming connections on the forwarded port seem to work fine e.g. for P2P protocols
First refer to the VPN server port forwarding setup page.
Once enabled, you will keep the same forwarded port for 60 days as long as you bind mount the /gluetun
directory. It will be automatically refreshed.
@jawilson developed a plugin to automagically update the forwarded port in Deluge: deluge-piaportplugin
To see a list of servers available, list the VPN servers with Gluetun.