Quantcast
Channel: How make openvpn work with docker - Stack Overflow
Viewing all articles
Browse latest Browse all 10

Answer by Adam Shand for How make openvpn work with docker

$
0
0

The default routes which cause the problem are pushed to the OpenVPN client by the OpenVPN server.

Rather then create a script to delete the routes you can simply stop the problematic routes from being created in the first place.

There are two ways to do this:

  1. If you can change the settings on the OpenVPN server, edit the config and remove the redirect-gateway option. On my EdgeRouter the relevant line looks like this:

    openvpn-option "--push redirect-gateway def1"

    One a Linux server I believe it would look like this:

    push "redirect-gateway def1"

  2. If you can't change settings on the OpenVPN server you can tell your OpenVPN client to ignore the pushed routes from the server. On my Linux client the relevant line looks like this:

    pull-filter ignore redirect-gateway

Once you've made those changes and restarted the OpenVPN service you should be able to start Docker containers without the dreaded could not find an available, non-overlapping IPv4 address error.


Viewing all articles
Browse latest Browse all 10

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>