The very first first step on securing a server is installing a firewall (atleast IP tables based) to close all unused or unwanted ports. Once the firewall is installed it is often considered 50% of work done. You can install CSF firewall or APF firewall. Often BFD (brute force detection) utilities comes with firewall.

We will install CSF (Config security firewall) as it is easy to install with plenty of features and easily integrated to CPanel (if you are running)

PHP Code:
PHP Code: 
wget http://www.configserver.com/free/csf.tgz 
tar zxf csf.tar.gz 
sh 
/csf/install.sh 


Follow the installer and once installed, you can start the firewall.
PHP Code:
PHP Code: 
csf -
// start the firewall 
csf -
// restart the firewall 
csf -
// flush the rules or stop the firewall. 
Albert.Nawaro Reviewed by Albert.Nawaro on . Install Firewall on CentOs The very first first step on securing a server is installing a firewall (atleast IP tables based) to close all unused or unwanted ports. Once the firewall is installed it is often considered 50% of work done. You can install CSF firewall or APF firewall. Often BFD (brute force detection) utilities comes with firewall. We will install CSF (Config security firewall) as it is easy to install with plenty of features and easily integrated to CPanel (if you are running) PHP Code: Rating: 5