Here’s a simple guide to setting up ConfigServer Firewall, also known as CSF. This firewall features a built-in brute-force and flood protection option, with a web-based interface only available in WHM. It’s pretty slick if you ask me. Anyhow, here’s how to set it up.
SSH into your server as root
Paste the following code into your shell:
wget http://configserver.com/free/csf.tgz
tar -xzvf csf.tgz
cd csf*
sh ./install.cpanel.sh
You’re done!
You should now see Configserver Firewall & Security under WHM > Plugins.

Click on that, then you’ll see this on the right side:

Click the Enable button.
Then, goto the Upgrade box, and click Remove APF/BFD

This will ensure that you don’t have conflicting firewalls and security software running on your server. APF is a standalone, command-line firewall for Linux. BFD is Bruteforce Daemon which protects the servers against bruteforce attacks. However, CSF has a built-in version of that called LFD or Login Failure Daemon. A daemon can be defined as any service that runs in the background as a non-interactive process.
Next, we’ll set the Security Level of CSF to Medium. Find this button under the Upgrade box.

Click on the button, and it will take you to another screen.

Find the column that matches this, then click on the Medium button. I find that High is a little too sensitive, and Medium is strong enough to deter most script kiddies away.
Don’t forget to add your IP ( www.whatismyip.com ) to the Green Box!
After you’re done, it will tell you to restart CSF, do so and you’re done with Part 1 of CSF setup. My next blog post will be a continuance of this, to setup all the options CSF gives you.