CentOS 7.0默認(rèn)使用firewall作為防火墻
1.切換到 root 用戶:su -root
2.命令:systemctl stop/start firewalld.service(關(guān)閉/開啟防火墻)
? ? ? ? ? ? ? systemctl disable/enable?firewalld.service(關(guān)閉/開啟防火墻自動(dòng)啟動(dòng))
? ? ? ? ? ? ??firewall-cmd --list-all(顯示防火墻應(yīng)用列表)
3.查看防火墻狀態(tài):systemctl status firewalld.service、firewall-cmd --state文章來源:http://www.zghlxwxcb.cn/news/detail-669253.html
CentOS-7之前版本,?是用iptables
? ? ? ? 1.命令:service iptables stop/start(關(guān)閉/開啟防火墻)
? ? ? ? ? ? ? ? ? ? ? service iptables status(查看狀態(tài))
? ? ? ? 2.關(guān)閉/開啟防火墻的自動(dòng)運(yùn)行
? ? ? ? ? ? ? ? 執(zhí)行命令:chkconfig iptables off/on
? ? ? ? ? ? ? ? 驗(yàn)證:chkconfig --list | grep iptables文章來源地址http://www.zghlxwxcb.cn/news/detail-669253.html
到了這里,關(guān)于centos7 防火墻的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!