【问题描述】
部署nginx容器之后,发现物理网卡80端口不通,而在物理机上telnet docker虚拟网卡却是通的,并且可以正常访问nginx的页面。
【问题解决】
1、#docker info
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
2、#vim /etc/sysctl.conf
net.bridge.bridge-nf-call-ip6tables=1
net.bridge.bridge-nf-call-iptables=1
net.bridge.bridge-nf-call-arptables=1
net.ipv4.ip_forward=1
3、重启网络
#systemctl restart network