docker访问宿主机:No route to host (Host unreachable)
程序员文章站
2024-03-13 23:39:10
...
- 修改firewalld配置文件
[[email protected] ~]# vim /etc/firewalld/zones/public.xml
在rule中添加docker网桥ip段
<rule family="ipv4">
<source address="172.17.0.0/16" />
<accept />
</rule>
- 重启firewalld
[[email protected] ~]# systemctl restart firewalld