Skip to content

Instantly share code, notes, and snippets.

Created December 6, 2018 09:28
What would you like to do?
Docker VPN server
ufw allow 500/udp
ufw allow 4500/udp
git clone
cd docker-ipsec-vpn-server
docker build -t hwdsl2/ipsec-vpn-server .
cp vpn.env.example vpn.env
# generate psk and password
head /dev/urandom | tr -dc A-Za-z0-9 | head -c 13 ; echo ''
vim vpn.env
docker run \
--name ipsec-vpn-server \
--env-file ./vpn.env \
--restart=always \
-p 500:500/udp \
-p 4500:4500/udp \
-v /lib/modules:/lib/modules:ro \
-d --privileged \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment