Linux防火牆的關閉、開啟和配置

chenfengwww發表於2010-11-03


Linux防火牆的關閉和開啟


1) 重啟後生效
開啟: chkconfig iptables on
關閉: chkconfig iptables off

2) 即時生效,重啟後失效
開啟: service iptables start
關閉: service iptables stop


3)防火牆設定,開啟相關埠,
修改/etc/sysconfig/iptables 檔案,新增以下內容:
-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

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22036495/viewspace-1040825/,如需轉載,請註明出處,否則將追究法律責任。

相關文章