Help In Linux

Linux Technical Blog
April 4, 2015

restorecon: command not found CentOS 6 & 7

Hello team,

I have come across strange issue when trying to save iptables rules. I received the following error.

 

 service iptables save

O/P

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

 

You need to install policycoreutils package to fix the same.

 

yum install policycoreutils 

 

and now you will be able to save iptables rules.

Reference: https://raymii.org/s/snippets/CentOS_Save_iptables_restorecon_error.html

Leave a Comment



Protected by WP Anti Spam