Unable to save any rule with iptables? Fix it now!

Some of our clients reported us they were unable to save iptables rules on their servers. That's why. we're writing the tutorial to fix their issue.

Output (when they tried to save custom iptables rules):

[root@server1]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables: /etc/init.d/iptables: line 268: restorecon: command not found [FAILED]

If you face the same issue, simply run the following command:

yum install policycoreutils -y

The above installation will solve the problem with the iptables-save option. :)

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

CSF command not found in cPanel/WHM server

CSF – Config server firewall is a firewall configuration tool for WHM/cPanel server. CSF is...

How to install ConfigServer Security & Firewall

ConfigServer Firewall, also known as CSF, is a firewall configuration script created to provide...

How to install ConfigServer Explorer (cse)

To install or upgrade cse simply do the following from the root shell via SSH: cd /usr/src rm...

Fix False Downtime Reports of Your Server

Many of our clients are using uptimerobot to ensure the uptime status of their servers. Some of...

How to ignore emails/messages sent by CSF/LFD

Many peoples would like to ignore messages sent by CSF/LFD. So, we're writing a tutorial to guide...