CSF is a popular firewall in the web hosting industry since it integrates very well with the WHM side of the cPanel/WHM Linux control panel suite. When configured correctly CSF will block any IP addresses/hostnames that attempt to attack your VPS in any way; for example, you may find that a bot is trying to attack your server by trying to access a certain service using different username and password combinations - after a certain amount of failed logins, LFD (logon failure daemon) which comes with CSF will automatically block the attacking IP. Installing CSF really is a piece of cake; all you need to do for the basic installation is run the following commands in an SSH window:
1. wget
http://www.configserver.com/free/csf.tgz2. tar -xzf csf.tgz
3. cd csf
4. sh install.sh
Once you have done that, you will find that CSF has been successfully installed and can be managed through the WHM control panel. All you need to do is scroll down to the bottom of the left hand menu and select it from under the ‘Plug-Ins’ menu. However, in some cases you may find that your cPanel server already has another firewall combination install - APF and BFD; now, in order for CSF to work you will need to remove both of these, to do so you will need to run the following command from the CSF folder in your terminal window:
sh remove_apf_bfd.sh
Once initially installed CSF will be running in what is called ‘testing’ mode which means that it isn’t doing its assigned job - protecting your server from malicious attackers. From here you will need to configure CSF yourself using the configuration file, and once you are happy with your modifications you only need to set the ‘TESTING’ variable in the configuration file from its current value of ‘1′ to ‘0′ which will then put the firewall into actions once it has been restarted.