Docker Community Forums

Share and learn in the Docker community.

Container with custom docker bridge network fails to ping external world on one host

(Devtkrishna) #1
On most Linux hosts, I see the following

# docker network create -d bridge --subnet kthommandra-net
# docker run --rm -it --name kthommandra-tc --network=kthommandra-net tomcat:8-jre8 /bin/bash
root@efa4b6ff59c4:/usr/local/tomcat# # ping
PING ( 56(84) bytes of data.
64 bytes from ( icmp_seq=1 ttl=48 time=4.06 ms
64 bytes from ( icmp_seq=2 ttl=48 time=4.01 ms

But on one particular host, the ping fails.
If the same container is connected to host network namespace, then ping works fine.

I have compared iptables, route entries between passing and failing hosts and could not spot any difference.

On tcpdumping at the host interface and bridge interface, I see that ping replies are coming into the host but not reaching the bridge interface.

Any clues to debug further? Any host level settings that matter?```