The Way to Pro Full Stack

Do things in a simple way

Your own VPN server = AWS EC2 + docker + L2TP image

  1. Register your AWS account
  2. Use the following EC2 userdata to launch a free tier Ubuntu EC2, you need to replace YOUR_SEC,YOUR_USERNAME,YOUR_PASSWORD:
curl -s | sh
/etc/init.d/docker start
docker pull fcojean/l2tp-ipsec-vpn-server
modprobe af_key
docker run \
    --name l2tp-ipsec-vpn-server \
    -e 'VPN_USER_CREDENTIAL_LIST=[{"login":"YOUR_USERNAME","password":"YOUR_PASSWORD"}]' \
    -p 500:500/udp \
    -p 4500:4500/udp \
    -v /lib/modules:/lib/modules:ro \
    -d --privileged \
  1. Security group: you need to allow UDP port 500, 4500
  2. Done