CentOS7 關(guān)閉防火墻

CentOS6關(guān)閉防火墻使用以下命令,

CentOS7中若使用同樣的命令會報(bào)錯(cuò),

????stopiptables.service

????Failedtostopiptables.service: Unit iptables.servicenotloaded.

這是因?yàn)镃entOS7版本后防火墻默認(rèn)使用firewalld,因此在CentOS7中關(guān)閉防火墻使用以下命令,

????//臨時(shí)關(guān)閉systemctl stop firewalld

????//禁止開機(jī)啟動systemctl disable firewalld

????Removed symlink/etc/systemd/system/multi-user.target.wants/firewalld.service.

????Removed symlink/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

當(dāng)然,如果安裝了iptables-service,也可以使用下面的命令,

????yum install -y iptables-services

????//關(guān)閉防火墻

????service iptables stop

????Redirectingto/bin/systemctlstopiptables.service

????//檢查防火墻狀態(tài)

????service iptables status?

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

友情鏈接更多精彩內(nèi)容