We had an issue where one site could not communicate with the intranet server. The intranet server is an apache2 instance in a Docker container and was assigned the network pool of 192.168.0.0/20 automatically when it was created. Whereas the local network, in this case, had the subnet 192.168.5.0/24, obviously this will cause an issue for routing the traffic. The permanent fix is to make sure that Docker assigns subnets outside of your local subnet addresses.
- Open daemon.json:
- Add the entry below substituting your desired address range:
"default-address-pools" : [
"base" : "126.96.36.199/16",
"size" : 24
- Restart Docker for the change to take effect:
systemctl restart docker
- All of your currently configured networks will remain, this will only have an impact on newly created containers.
- Of course, you will still need to address and remove the conflicting network. In my case, I used docker-compose so I simply had to run the commands below. The first command will tear down the container, including the network. The second will rebuild it.
docker-compose up -d