iptables – restorecon: command not found

We have found reports of some people seeing a “restorecon: command not found” when attempting to start or save iptable rules.


iptables: Saving firewall rules to /etc/sysconfig/iptables: /etc/init.d/iptables: line 274: restorecon: command not found

We have found this error on some CentOS 6 installations (virtualized.)

This error is due to a missing package “policycoreutils” – in order to fix this problem, you simply need to install it with yum:

yum install policycoreutils

Once this has been installed, you should be able to save and/or restart iptables on your CentOS 6 server.

Share This Post

About Author: Curtis K

Hi! My name is Curtis, and I am the author of CentOS Blog. Please feel free to comment with any suggestions, feedback or questions!