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
- Unable to connect to docker on Anyconnect VPN
- https://blog.ramjee.uk/docker-within-a-vpn/
- https://www.lullabot.com/articles/fixing-docker-and-vpn-ip-address-conflicts
but my knowledge on the Linux/docker network side is so limited that I cannot fix it myself. Please help.