1. 程式人生 > >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

作者:u010765236
來源:CSDN
原文:https://blog.csdn.net/u010765236/article/details/79633957
版權宣告:本文為博主原創文章,轉載請附上博文連結!