Centos VM with Docker getting host unreachable when trying to connect to itself Centos VM with Docker getting host unreachable when trying to connect to itself docker docker

Centos VM with Docker getting host unreachable when trying to connect to itself


FYI, I resolved the problem on centos by using the default "bridged" containers provided by Docker, but adding the following to my firewalld configuration:

firewall-cmd --permanent --zone=trusted --add-interface=docker0firewall-cmd --reloadservice firewalld restart

You might also need to open up a port to allow external communication, like so:

firewall-cmd --zone=public --add-port=8080/tcp --permanent


My solution was to switch to an Ubuntu VM, because switching my docker compose to the default "bridged" network broke my aliases, which I really needed

The only remaining question here is why after configuring firewalld, a user-configured network on docker-compose cannot access the external IP, forcing us to switch to the default bridged network