Skip to content

Instantly share code, notes, and snippets.

@meabed
Last active November 5, 2018 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meabed/1e94966f25a77217d08a77ae7784193f to your computer and use it in GitHub Desktop.
Save meabed/1e94966f25a77217d08a77ae7784193f to your computer and use it in GitHub Desktop.
curl -fsSL get.docker.com -o get-docker.sh
sh get-docker.sh
cat >./vpn.env <<EOL
VPN_IPSEC_PSK=ipsec_shared_key
VPN_USER=admin
VPN_PASSWORD=vpn_pass
VPN_DNS_SRV1=1.1.1.1
VPN_DNS_SRV2=1.0.0.1
VPN_DNS_SRV3=8.8.8.8
EOL
docker run \
--name ipsec-vpn-server \
--env-file ./vpn.env \
--restart=always \
-p 500:500/udp \
-p 4500:4500/udp \
-p 443:500/udp \
-p 8443:500/udp \
-v /lib/modules:/lib/modules:ro \
-d --privileged \
hwdsl2/ipsec-vpn-server
docker exec -it ipsec-vpn-server ipsec status
docker exec -it ipsec-vpn-server ipsec whack --trafficstatus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment