問題:
配置了一臺 CentOS 虛擬機(jī),發(fā)現(xiàn) ping 不通外網(wǎng),但是 ping 主機(jī)和網(wǎng)關(guān)可以 ping 通。
解決方法:
可以嘗試關(guān)閉防火墻。
查看默認(rèn)防火墻狀態(tài)(關(guān)閉后顯示notrunning,開啟后顯示running)
firewall-cmd --state
停止firewall
systemctl stop firewalld.service
或
systemctl stop firewalld
禁止firewall開機(jī)啟動
systemctl disable firewalld.service
或
systemctl disable firewalld
相關(guān)教程推薦:centos教程