Linux firewall settings

  

1, what is a firewall?

A firewall is an information security protection system that allows or restricts the transmission of data according to specific rules.

2, Linux firewall settings

2.1, firewall configuration file iptables path

/etc/sysconfig/iptables

Generally edit this configuration file directly Just fine. Please backup before editing.

2.2, iptables open, close and restart

service iptables start

service iptables stop

service iptables restart

modify settings You need to restart the iptables service.

2.3, save with the command settings

If you use the command to set iptables, it will take effect, but it is not written to /etc/sysconfig/iptables file, restart Invalid, need to be written to iptables.

/etc/rc.d/init.d/iptables save

2.4, check the settings of the machine about iptables

iptables -L -n

Copyright © Windows knowledge All Rights Reserved