@
villivateur #1
docker 容器用的网卡名是 br-2db4a9812e19
......
-A FORWARD -o br-2db4a9812e19 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -o br-2db4a9812e19 -j DOCKER
-A FORWARD -i br-2db4a9812e19 ! -o br-2db4a9812e19 -j ACCEPT
-A FORWARD -i br-2db4a9812e19 -o br-2db4a9812e19 -j ACCEPT
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A OUTPUT -d 169.254.0.0/16 -j InstanceServices
-A DOCKER -d 172.23.0.2/32 ! -i br-2db4a9812e19 -o br-2db4a9812e19 -p tcp -m tcp --dport 443 -j ACCEPT
-A DOCKER -d 172.23.0.2/32 ! -i br-2db4a9812e19 -o br-2db4a9812e19 -p tcp -m tcp --dport 80 -j ACCEPT
-A DOCKER-ISOLATION-STAGE-1 -i docker0 ! -o docker0 -j DOCKER-ISOLATION-STAGE-2
-A DOCKER-ISOLATION-STAGE-1 -i br-2db4a9812e19 ! -o br-2db4a9812e19 -j DOCKER-ISOLATION-STAGE-2
-A DOCKER-ISOLATION-STAGE-1 -j RETURN
-A DOCKER-ISOLATION-STAGE-2 -o docker0 -j DROP
-A DOCKER-ISOLATION-STAGE-2 -o br-2db4a9812e19 -j DROP
-A DOCKER-ISOLATION-STAGE-2 -j RETURN
-A DOCKER-USER -j RETURN
........
-A POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE
-A POSTROUTING -s 172.23.0.0/16 ! -o br-2db4a9812e19 -j MASQUERADE
-A POSTROUTING -s 172.17.0.2/32 -d 172.17.0.2/32 -p tcp -m tcp --dport 443 -j MASQUERADE
-A POSTROUTING -s 172.17.0.2/32 -d 172.17.0.2/32 -p tcp -m tcp --dport 80 -j MASQUERADE
-A POSTROUTING -s 172.23.0.2/32 -d 172.23.0.2/32 -p tcp -m tcp --dport 443 -j MASQUERADE
-A POSTROUTING -s 172.23.0.2/32 -d 172.23.0.2/32 -p tcp -m tcp --dport 80 -j MASQUERADE
-A DOCKER -i docker0 -j RETURN
-A DOCKER -i br-2db4a9812e19 -j RETURN
-A DOCKER ! -i br-2db4a9812e19 -p tcp -m tcp --dport 443 -j DNAT --to-destination 172.23.0.2:443
-A DOCKER ! -i br-2db4a9812e19 -p tcp -m tcp --dport 80 -j DNAT --to-destination 172.23.0.2:80
iptables 中相关的规则都在这了,看不太懂,我应该加什么配置才能过