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

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM