Sign inSign up

bradqwood/docker-openvpn-client

By bradqwood

•Updated over 7 years ago

OpenVPN client

Image
0

127

bradqwood/docker-openvpn-client repository overview

⁠Docker OpenVPN Client

Original idea borrowed from https://github.com/dperson/openvpn-client⁠

  1. You should add the generated openvpn client config to a directory, you can call it client.ovpn
  2. You should add the password for the private key in the client.ovpn to client.pwd
  3. Run the following, I recommend adding --auth-nocache
docker run -d --name vpn-client \
  --cap-add=NET_ADMIN \
  --device /dev/net/tun \
  -v /path/with/vpn/configs:/vpn \
  ekristen/openvpn-client --config /vpn/client.conf --askpass /vpn/client.pwd --auth-nocache
⁠Route container traffic

Use --net=container:<container-id> -- routes available by the VPN client will be made available to the container.

docker run -it --rm \
  --net=container:vpn-client
  ubuntu /bin/bash

Tag summary

Content type

Image

Digest

Size

4.1 MB

Last updated

over 7 years ago

docker pull bradqwood/docker-openvpn-client