How to use this image

This OpenVPN container was designed to be started first to provide a connectionto other containers (using --net=container:vpn, see below Starting an OpenVPNclient instance).

NOTE: More than the basic privileges are needed for OpenVPN. With docker 1.2or newer you can use the --cap-add=NET_ADMIN and --device /dev/net/tunoptions. Earlier versions, or with fig, and you'll have to run it in privilegedmode.

NOTE 2: If you have connectivity issues, please see the DNS instructionsbelow.

NOTE 4: If you have a VPN service that allows making local servicesavailable, you'll need to reuse the VPN container's network stack with the--net=container:vpn (replacing 'vpn' with what you named your instance of thiscontainer) when you launch the service in it's container.

NOTE 5: If you need a template for using this container withdocker-compose, see the examplefile.

Routing for local access to non HTTP proxy-able ports

The argument to the -r (route) command line argument must be your localnetwork that you would connect to the server running the docker containers on.Running the following on your docker host should give you the correct network:ip route | awk '!/ (docker0|br-)/ && /src/ {print $1}'

NOTE: if you don't use the -v to configure your VPN, then you'll have tomake sure that redirect-gateway def1 is set, otherwise routing may not work.

NOTE 2: if you have a port you want to make available, you have to add thedocker -p option to the VPN container. The network stack will be reused bythe second container (that's what --net=container:vpn does).

DNS Issues (May Look Like You Can't Connect To Anything)

Often local DNS and/or your ISP won't be accessable from the new IP address youget from your VPN. You'll need to add the --dns command line option to thedocker run statement. Here's an example of doing so, with a Google DNS server: