Error:
After adding a new rule in iptables, it is needed to save those rule and restart iptables.
When saving iptables rule,
# root@server [~]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables: /etc/init.d/iptables: line 268: restorecon: command not found
[FAILED]
The rules will not be saved and we will keep getting the above error when saving iptables.
Solution:
The reason in getting such an error message is because of the missisng of restorecon file.
See the result of the follwing command, 'restorecon' is missiing in there.
root@server [~]# ls -l /sbin/ | grep restore
lrwxrwxrwx 1 root root 14 Jan 9 22:23 iptables-restore -> iptables-multi*
restorecon is provided by policycoreutils package. Try re-installing policycoreutils package and see the result of the above command.
# yum update policycoreutils
After the update, run the following command to check whether 'restorecon' available or not.
root@server [~]# ls -l /sbin/ | grep restore
lrwxrwxrwx 1 root root 14 Jan 9 22:23 iptables-restore -> iptables-multi*
lrwxrwxrwx 1 root root 8 Jan 15 19:50 restorecon -> setfiles*
If you get an output as like above, it will fix the above iptables save issue.
About Me
Categories
Archives
Populares
-
Situation : I have removed some mails from the MDaemon server from the backend,ie, browsed through the mail box and deleted some mails mauna...
-
Bash script To Change password of all mail accounts The bash script given below will change the password of all the mail accounts in ...
-
Domain already exists error while adding a subdomain or addon domain A very common error when adding an addon or parked domain via cpanel....
-
Container:- A container (otherwise known as CT, Virtual Environment (VE), Virtual Private Server (VPS) etc.) is one of the main concepts...
-
Error : When i run the following command in terminal i got an errors as shown below. I got this error in a cpanel 11.32.5 (build 18) server....
-
Joomla Error: Warning: require_once(Cache/Lite.php) [function.require-once]: failed to open stream: No such file or directory in /home/test/...
-
Fix permissions/ownership under a reseller I recently had an issue with incorrect ownership and permissions of...
-
Download and Extract Memcache package root@server [~]# cd /usr/local/src root@server [/usr/local/src]# wget http://pecl.php.net/get/memcac...
-
Bash script to List All Mail Accounts in cPanel Server The bash script given below will list all the mail accounts in a cpanel server and t...
-
To check if your VE ran out of its disk quota, use the following commands (inside a VPS). # df -To show disk space usage # df -i -To ...