Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Docker VPN server
ufw allow 500/udp
ufw allow 4500/udp
git clone https://github.com/hwdsl2/docker-ipsec-vpn-server.git
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 \
hwdsl2/ipsec-vpn-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment