Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

OpenVPN on Docker with keys baked-in

Useful for spinning up pre-configured OpenVPN server on-demand with a trusted/secure Docker repo.

Builds on top of: (Read the doc there first)

mkdir vpn-data
cd vpn-data

Init keys

Replace IP and enter password

docker run -v /home/ian/git/openvpn-full-docker:/etc/openvpn --log-driver=none --rm kylemanna/openvpn:2.4 ovpn_genconfig -u udp://
docker run -v /home/ian/git/openvpn-full-docker:/etc/openvpn --log-driver=none --rm -it kylemanna/openvpn:2.4 ovpn_initpki

Bake keys into image for convience (trust Docker repo)

sudo chmod -R a+rx pki
sudo chmod -R a+rx
docker build -t ovpn .

To Debug:

docker run -ti --rm -p 1194:1194/udp --cap-add=NET_ADMIN ovpn

Generate client cert

docker run --log-driver=none --rm -it ovpn easyrsa build-client-full CLIENTNAME nopass

docker run --log-driver=none --rm ovpn ovpn_getclient CLIENTNAME > CLIENTNAME.ovpn

You can’t perform that action at this time.