Install and configure firewall on CentOS

First one have to install

yum install system-config-securitylevel

Now start this little tool


and adapt settings as needed.

The configuration is saved in




To test new rules restart the service

service iptables restart ; sleep 20 ; service iptables stop

Take a look, we wait for 20 seconds and stop the service automatically.

Just in case one of the rule fails and system access is blocked.

Did it work for you. Just drop a comment.


Popular Posts