Docker Community Forums

Share and learn in the Docker community.

Port publishing in RHEL 7 and CentOS 7 not working


(Santosh Kumar Gupta) #1

I’ve a Apache Docker image which runs perfectly on CentOS 6.6 and it publish the port 80 on host interface when run with -p 80:80 parameter. But the same does not work in RHEL 7 or CentOS 7. I disabled firewalld but still its not working. netstat -ntple command shows docker-proxy listening on port 80 of host interface.
Please let me know if anything I’m missing or the correct way to make it work.


(Santosh Kumar Gupta) #2

Hi everyone,
Docker add the below PREROUTING iptables rule when its starts:
DOCKER all – 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type LOCAL

If I delete this rule than its working for me.

I don’t know this is a bug or feature…