Thank you: http://my.oschina.net/u/217959/blog/38051
(1) Permanent effect after reboot:
Open: Chkconfig iptables on
OFF: Chkconfig iptables off
(2) Immediate effect, failure after restart:
Open: Service iptables start
Close: Service iptables stop
It should be stated that for other services under Linux, the above command can be used to perform the open and close operations.
When the firewall is turned on, make the following settings, open the relevant port,
Modify the/etc/sysconfig/iptables file to add the following:
-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
Or:
/etc/init.d/iptables status will get a series of messages stating that the firewall is open.
/etc/rc.d/init.d/iptables Stop shutting down the firewall
Linux off Firewall