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...

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...

DDoS/DOS Prevention Settings in CSF firewall

Denial of Service (DoS) and Distributed Denial of Service (DDoS) attacks are common threats that...

Useful CSF SSH Command Line Commands

This article covers some useful ConfigServer Firewall (CSF) SSH command line commands in a "cheat...