首页 > 其他分享 >Docker容器no route to host解决

Docker容器no route to host解决

时间:2022-10-10 10:14:04浏览次数:51  
标签:iptables 容器 no route 防火墙 Centos7 host 服务器

在使用Centos7上使用docker容器访问其他服务器的的端口时,发现容器无法访问外部服务器的端口,却可以ping通外部服务器的地址。其中Centos7中的防火墙也是关的,经过发现docker启动时会自动调用iptables防火墙来作为管理,所以即使我们关闭了firewalld防火墙也没有效果。
解决方案
Centos7关闭iptables服务
sudo systemctl stop iptables.service

标签:iptables,容器,no,route,防火墙,Centos7,host,服务器
From: https://www.cnblogs.com/uqing/p/16774659.html

相关文章