Fix docker blocking VPN access

I’ve had a computer in a network running a CI. Everything works locally but then as soon as I connect form VPN, I cannot access that computer anymore.

Today I figured out why 🙂

The VPN server is allocating addresses on 172.18.0.0/16 which overlaps with the docker private networks.

All I had to do was delete all the docker created networks, add this bit of configuration in /etc/docker/daemon.json

{
  "default-address-pools" : [
    {
      "base" : "172.240.0.0/16",
      "size" : 24
    }
  ]
}

restarted docker

sudo systemctl restart docker

and docker-compose up my environment.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *