# OpenVPN
docker run -it --rm --cap-add=NET_ADMIN -e VPN_SERVICE_PROVIDER=ivpn \
-e VPN_TYPE=openvpn -e OPENVPN_USER=abc -e OPENVPN_PASSWORD=abc \
-e SERVER_CITIES=amsterdam qmcgaw/gluetun
# Wireguard
docker run -it --rm --cap-add=NET_ADMIN -e VPN_SERVICE_PROVIDER=ivpn \
-e VPN_TYPE=wireguard \
-e WIREGUARD_PRIVATE_KEY=wOEI9rqqbDwnN8/Bpp22sVz48T71vJ4fYmFWujulwUU= \
-e WIREGUARD_ADDRESSES="10.64.222.21/32" \
-e SERVER_CITIES=amsterdam qmcgaw/gluetun
version: "3"
services:
gluetun:
image: qmcgaw/gluetun
cap_add:
- NET_ADMIN
environment:
- VPN_SERVICE_PROVIDER=ivpn
- VPN_TYPE=wireguard
- WIREGUARD_PRIVATE_KEY=wOEI9rqqbDwnN8/Bpp22sVz48T71vJ4fYmFWujulwUU=
- WIREGUARD_ADDRESSES=10.64.222.21/32
- SERVER_CITIES=Amsterdam
VPN_SERVICE_PROVIDER=ivpn
OPENVPN_USER
can be your email address or your account ID (i-xxxx-xxxx-xxxx
orivpn-xxxx-xxxx-xxxx
)OPENVPN_PASSWORD
is needed ifOPENVPN_USER
is not your account ID.
WIREGUARD_PRIVATE_KEY
is your 32 bytes key in base64 format. Note this is specific by user and the same for all servers.WIREGUARD_ADDRESSES
is your IP network interface address in the formatxx.xx.xx.xx/xx
. Note this is specific by user and the same for all servers.
SERVER_COUNTRIES
: Comma separated list of countriesSERVER_CITIES
: Comma separated list of citiesSERVER_HOSTNAMES
: Comma separated list of server hostnamesISP
: Comma separated list of ISPsVPN_ENDPOINT_PORT
: Custom Wireguard server endpoint port to use, which can be one of:2049
,2050
,53
,30587
,41893
,48574
,58237
IPv6 is automatically enabled in the routing, firewall, wireguard and openvpn setup if it's supported.
If you want to tunnel IPv6:
-
Ensure your Kernel has IPv6
lsmod | grep ipv6
Should show something.
-
Enable IPv6 in Docker for this container:
-
For a Docker run command, add the flag
--sysctl net.ipv6.conf.all.disable_ipv6=0
(or--sysctl net.ipv6.conf.all.disable=0
on some systems) -
For docker-compose.yml files, add this to your
gluetun
config block:sysctls: - net.ipv6.conf.all.disable_ipv6=0
-
-
Start the container
To see a list of servers available, list the VPN servers with Gluetun.