Docker container can't talk to servers on the same subnet as its docker host
I have 1 container on my docker host. The docker host has 2 physical interfaces, the interface with a public IP address is configured as my default route.
The container sits on a simple user defined docker bridge network with no customisation.
When I am inside of the docker container, and I ping 126.96.36.199, i can see through a tcpdump that the packets are on the user defined docker network, and then the public interface and out to the internet and i get an ICMP request followed by ICMP reply.
However, if I try to ping another server, which has an IP in the same subnet range as this docker host I don’t see the packets go passed the user defined docker network. The tcpdump shows requests but no replies. This is not just for ICMP, connecting to host from the container on other protocols also provides no reply.
It’s worth saying that server1 and server2 can communicate with each other, it’s just the container on server1 cannot communicate with server2.
Does anyone know why this might happen? I’m told there are no firewall rules in place that would prevent this from happening.