If you cannot ssh via vpn to your machine after starting the docker service, this is likely due to overlapping addresses of docker networks and other stuff.
follow these steps:
- Stop all running containers
- Remove existing docker networks by running
docker network prune - Inspect if all networks were removed by running
docker network list. Only networks with namesbridgehostandnoneshould remain. If there are other networks, rundocker network rm [NETWORK ID]. - Edit/create the file
/etc/docker/daemon.jsonand insert:This will tell docker to use the ip range{ "default-address-pools" : [ { "base" : "172.240.0.0/16", "size" : 24 } ] }172.240.0.0/16for newly created docker networks - Restart the machine
- Start the docker service:
systemctl start docker - First time using docker compose, you should use
docker compose up --force-recreate. This will recreate the deleted docker network, this time using an address from thedefault-address-pools. - You should now be able to ssh
Adapted from https://www.lullabot.com/articles/fixing-docker-and-vpn-ip-address-conflicts