Block external access to docker containers
问题 I would like to block direct access to the docker containers from outside. I use a haproxy and want to only allow access to port 80, 443. I added the following rule to iptables. But I still can access docker containers through different ports. *filter :INPUT DROP [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT -A INPUT -p