Docker 容器内访问宿主记时报"No route to host"

 

Docker 容器内访问宿主记时报”No route to host”

修复方式请按顺序运行以下命令:

# nmcli connection modify docker0 connection.zone trusted
# systemctl stop NetworkManager.service
# firewall-cmd --permanent --zone=trusted --change-interface=docker0
# systemctl start NetworkManager.service
# nmcli connection modify docker0 connection.zone trusted
# systemctl restart docker.service

If you like TeXt, don’t forget to give me a star :star2:.