Iptables service for CentOS 7
By default, CentOS 7 uses firewalld to manage iptables rules. Because firewall rules are rarely changed, it doesn't matter if they are not moved. But it is used to being a devil. Unlike before, it is always a bad habit.
Systemctl disable firewalld
Yum remove firewalld-y
Use the following methods to restore the original habits and solve the problem of iptables startup.
Yum install iptables-services-y
Systemctl enable iptables
In this case, the iptables service will start up and automatically import rules from the/etc/sysconfig/iptables file.
This is required for the/etc/init. d/iptables save command to take effect.
Cp/usr/libexec/iptables. init/etc/init. d/iptables
/Etc/init. d/iptables save
The chkconfig iptables command automatically redirects to sytemctl enable iptables.
-------------------------------------- Split line --------------------------------------
Iptables examples
Iptables-packet filtering (Network Layer) Firewall
Linux Firewall iptables
Iptables + L7 + Squid implements a complete software firewall
Basic use of iptables backup, recovery, and firewall scripts
Detailed description of firewall iptables usage rules in Linux
-------------------------------------- Split line --------------------------------------