docker网络不通的问题记录

【问题描述】

部署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

 
原文地址:https://www.cnblogs.com/wenquanli/p/14700305.html