[root@master tmp]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.1 (Santiago) [root@master tmp]# service iptables start iptables: No config file. [WARNING] [root@master tmp]# service iptables status Table: filter Chain INPUT (policy ACCEPT) num target prot opt source destination
Chain FORWARD (policy ACCEPT) num target prot opt source destination
Chain OUTPUT (policy ACCEPT) num target prot opt source destination
[root@master tmp]# service iptables stop iptables: Setting chains to policy ACCEPT: filter [ OK ] iptables: Flushing firewall rules: [ OK ] iptables: Unloading modules: [ OK ]
1 2 3 4 5 6 7 8 9 10
vim /etc/sysconfig/iptables
-- 永久性生效,重启后不会复原 chkconfig iptables on #开启 chkconfig iptables off #关闭 -- 即时生效,重启后复原 service iptables stop --停止 service iptables start --启动