Skip to content

Instantly share code, notes, and snippets.

@alastairhm
Created April 20, 2017 11:02
Show Gist options
  • Save alastairhm/6a94f2b9e299392a9e546a821cfa4ff8 to your computer and use it in GitHub Desktop.
Save alastairhm/6a94f2b9e299392a9e546a821cfa4ff8 to your computer and use it in GitHub Desktop.
Setting up Dockerized VPN
export OVPN_DATA="ovpn-data"
docker run --name $OVPN_DATA -v /etc/openvpn busybox
docker run --volumes-from $OVPN_DATA --rm kylemanna/openvpn ovpn_genconfig -u udp://$1:1194
docker run --volumes-from $OVPN_DATA --rm -it kylemanna/openvpn ovpn_initpki
docker run --volumes-from ovpn-data -d -p 1194:1194/udp --cap-add=NET_ADMIN kylemanna/openvpn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment