Container can’t pinged by a host which on the same network as the container’s host

  containers, docker, networking, virtualbox
  • The container’s networking is using default bridge pattern, and IP address is 172.17.0.2, gateway address is 172.17.0.1.
  • The container’s host A is centos8 installed in a virtual box. It address is 192.168.31.189, and can reachable the 172.17.0.2.
  • Another host B which on the same network as host A. It’s IP address 192.168.31.184 which can reachable the container’s gateway after i added a route " 172.17.0.0 mask 255.255.0.0 192.168.31.189 mask 255.255.255.0 ".
  • It is unfortunate that the host B can’t pinged the container’s IP 172.17.0.2.

How can I do this.

Thank you for taking the time to answer this question.

Source: Docker Questions

LEAVE A COMMENT