查看防火墻狀態(tài):
命令:
/etc/init.d/iptables status
臨時(shí)關(guān)閉防火墻:
命令:
/etc/init.d/iptables stop
出現(xiàn)三個(gè)OK,關(guān)閉成功,此時(shí)防火墻已經(jīng)關(guān)閉,不許重啟已經(jīng)生效。
命令:
/etc/init.d/iptables status
關(guān)閉后查看狀態(tài),應(yīng)該顯示firewall is not running
永久性關(guān)閉防火墻:
命令:
#chkconfig --level 2345 iptables off
或者
#chkconfig iptables off
其中2345 代表”執(zhí)行等級(jí)“
等級(jí)0表示:表示關(guān)機(jī)
等級(jí)1表示:單用戶模式
等級(jí)2表示:無網(wǎng)絡(luò)連接的多用戶命令行模式
等級(jí)3表示:有網(wǎng)絡(luò)連接的多用戶命令行模式
等級(jí)4表示:不可用
等級(jí)5表示:帶圖形界面的多用戶模式
等級(jí)6表示:重新啟動(dòng)
相關(guān)教程推薦:centos教程