关于centos7 No route to host 报错的解决方法。

 

 如图所示:centos7 No route to host 报错,解决方法如下:

使用  ping 192.168.1.113 结果是正常的,其实出现上面的这种原因是防火墙没有关闭。


centos7 和centos6防火墙是不一样的:


centos7是 firewall


centos6是 iptables

 

firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)

 

启动一个服务:systemctl start firewalld.service


关闭一个服务:systemctl stop firewalld.service

 

在开机时启用一个服务:systemctl enable firewalld.service

在开机时禁用一个服务:systemctl disable firewalld.service

posted @ 2020-06-29 18:35  Charlien  阅读(21559)  评论(0编辑  收藏  举报