Created
December 6, 2018 09:28
-
-
Save bancek/bae328d44992e7ff456f86a44dfca653 to your computer and use it in GitHub Desktop.
Docker VPN server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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