My vps is centos 7 and after I typing this line:
$sudo systemctl status iptables.service -l
messages showed below:
● iptables.service - IPv4 firewall with iptablesLoaded: loaded (/usr/lib/systemd/system/iptables.service; enabled; vendor preset: disabled)Active: failed (Result: exit-code) since Sun 2018-07-29 09:54:48 UTC; 53s agoProcess: 119 ExecStart=/usr/libexec/iptables/iptables.init start (code=exited, status=1/FAILURE)Main PID: 119 (code=exited, status=1/FAILURE)
Jul 29 09:33:59 localhost.localdomain iptables.init: iptables: Applying firewall rules: iptables-restore: line 14 failedJul 29 09:33:59 localhost.localdomain iptables.init: [FAILED]Jul 29 09:54:48 *** iptables.init: iptables: Applying firewall rules: iptables-restore: line 14 failedJul 29 09:54:48 *** iptables.init: [FAILED]
The firewalld cannot be started too.
How to solve the problems. Please just do it.
Go to Solution.
Most likely there is an iptable table or chain that has been applied causing a conflict to the startup of the firewall. The best option is to delete custom rule by removing it. Here is a link to the iptable commands: https://linux.die.net/man/8/iptables. Here is another link to an article for an option to uninstall and reinstall the iptables (this will be for centOS): https://www.centos.org/forums/viewtopic.php?t=40889.