Solve the Problem of Unit iptables. service failed to load in CentOS 7.
Click me to enter the original address
Solve the Problem of Unit iptables. service failed to load in RHEL 7/CentOS 7/Fedora
I have been using CentOS 6 for a while, but I am not used to it. After the firewall is configured, run service iptables save to display "Failed to restart iptables. service: Unit iptables. service failed to load: No such file or directory. "error: the firewall is managed by firewalld in CentOS 7, RHEL 7, or Fedora. Of course, you can restore the traditional management method. Or use the new command for management.
If you use traditional commands, run the following command:
Systemctl stop firewalldsystemctl mask firewalld
And install iptables-services:
1yum install iptables-services
Set boot start:
Systemctl enable iptables
Systemctl [stop | start | restart] iptables # orservice iptables [stop | start | restart]
Service iptables save # or/usr/libexec/iptables. init save