linux查看防火墻狀態(tài) linux怎么永久關(guān)閉防火墻?
linux怎么永久關(guān)閉防火墻?1)重啟后生效:chkconfig iptables on off 2)立即生效,重啟后無(wú)效:Service iptables start off:Service ipt
linux怎么永久關(guān)閉防火墻?
1)重啟后生效:chkconfig iptables on off 2)立即生效,重啟后無(wú)效:Service iptables start off:Service iptables stop需要注意的是,Linux下的其他服務(wù)可以通過(guò)上述命令打開(kāi)和關(guān)閉。打開(kāi)防火墻后,進(jìn)行以下設(shè)置,打開(kāi)相關(guān)端口,修改/etc/sysconfig/iptables文件,并添加如下內(nèi)容:-a rh-firewall-1-input-M state--state new-M TCP-P TCP--dport 80-J accept-a rh-firewall-1-input-M state--state new-M TCP-P TCP--dport 22-J accept
Linux中有多種防火墻,一般稱為iptables。
1. Linux防火墻(iptables)重啟系統(tǒng)生效
打開(kāi):chkconfig iptables打開(kāi)關(guān)閉:chkconfig iptables關(guān)閉
2。Linux防火墻(iptables)立即生效,重啟后無(wú)效
打開(kāi):服務(wù)iptables啟動(dòng)關(guān)閉:服務(wù)iptables停止
3。其他Linux防火墻,請(qǐng)參考文檔。一般來(lái)說(shuō),Linux下的服務(wù)可以通過(guò)上面的命令來(lái)開(kāi)啟和關(guān)閉,而防火墻通常是以服務(wù)的形式運(yùn)行的,所以也是一種通用的方法。