chkconfig iptables onchkconfig iptables offservice iptables startservice iptables stop編輯 /etc/sysconfig/iptables,在 -A RH-Firewall-1-INPUT 鏈前添加 (需放在 -j REJECT 之前):
-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
第一條放行 HTTP (80),解決 Web 服務無法訪問;第二條放行 SSH (22) 確保遠程管理。