2

Following up on How make openvpn work with docker,

I have recently installed privacy vpn, and it turns out that enabled openvpn breaks docker.

When I try to run docker-compose up i get following error. . . Disabling vpn fixes the problem (however I'd rather not disable it). Is there any way to make these two co-exist peacefully?

but the focus is openconnect instead of openvpn.

The reason I need to do that is that I'm getting the same error as Docker "ERROR: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network"

And the explanation to that is,

...vpn adds routes that for following networks: 0.0.0.0/1 and 128.0.0.0/1 (these routes cover entire IP range), and docker can't find range of IP addresses to create it's own private network.

You need to add a default route (to route everything through openvpn) and disable these two specific routes. fix-routes script does that.

Obviously the solution fixes for openvpn, but not openconnect.
Hence the question.

Apart from the above links, I've also checked

but my knowledge on the Linux/docker network side is so limited that I cannot fix it myself. Please help.

xpt
  • 20,363
  • 37
  • 127
  • 216
  • 1
    My quick and dirty way to make the VPN connection created by `openconnect` inside a docker container work for the host is to start the container as privileged and bind mount `/etc/resolv.conf`. YMMV – CivFan Jan 10 '23 at 20:50

0 Answers0