Setting-up-an-vpn-server-on-ubuntu-with-docker-pptp-ipsec

PPTP mobtitude/vpn-pptp

1
~$ touch chapsecrets
1
2
3
# Secrets for authentication using PAP
# client server secret acceptable local IP addresses
username * password *
1
2
~$ sudo docker pull mobtitude/vpn-pptp
~$ sudo docker run --net=host --name pptp-vpn-server -d --privileged -p 1723:1723 -v /home/chapsecrets:/etc/ppp/chap-secrets mobtitude/vpn-pptp

L2TP/IPSec PSK hwdsl2/ipsec-vpn-server

1
touch vpn.env

vpn.env reference: https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/vpn.env.example

1
2
3
~$ sudo modprobe af_key
~$ sudo docker pull hwdsl2/ipsec-vpn-server
~$ sudo 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

Reference