Linux firewall closing and opening

1) After the restart to take effect
Open: chkconfig iptables on
shut down: chkconfig iptables off

2) With immediate effect,After the restart failure
Open: service iptables start
shut down: service iptables stop

It should be noted that for other services under Linux can be performed using the above command to open and close operations。

When you turn the firewall,Make the following settings,Open the relevant port,
Modify / etc / sysconfig / iptables file,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

Leave a Comment