CentOS Linux On and Off Firewall Commands

 There are two commands to enable and disable the firewall in CentOS Linux, one is temporary, and it will be restored after restarting; the other is permanent, and it will not be restored after restarting.

Check firewall status: service iptables status

1) Temporarily effective, restore after restart
: service iptables start
Close: service iptables stop

2) Permanent effect, will not be restored after restarting
: chkconfig iptables on
Close: chkconfig iptables off

 

For other services under Linux, you can use the above commands to perform opening and closing operations.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326427214&siteId=291194637