As the title. I can only access my docker container from the host when docker0 in promiscuous mode, even I had stopped my firewalld.service.
I start the container by this command
docker run -p 9000:80 --name nginx --rm nginx
.
And when I try to connect to the server:
curl 127.0.0.1:9000
, it returns: Recv failure: Connection reset by peer
But if I run tcpdump on the docker0 like this:
sudo tcpdump -i docker0
everything just works as expected. After some searching, I found the tcpdump command convert the docker0 interface to promiscuous mode.
my host system: centos-release-7-7.1908.0.el7.centos.x86_64
Docker version: 19.03.8