I am going to teach you, How to install ConfigServer & Firewall on your cPanel server. I assume you use CentOS.
Description: ConfigServer & Firewall(CSF) is widely used firewall application for web servers. It’s the highly recommended firewall. It has many built-in features to stop shell attacks, DDOS attacks, hijacking etc… If you are running web hosting on your server, this software “MUST” be installed. (Because I’ve got servived many times from DDOS attacks because of CSF.)
Login to Shell with your SSH client
Enter this command to download the CSF script.
wget http://www.configserver.com/free/csf.tgz
Extract the archive
tar -zxf csf.tgz
Execute install
sh csf/install.sh
Wait for few seconds to complete the install.
Test it.
//starts the CSF service under testing mode
csf -s
//restarts the CSF service
csf -r
//flush rules
csf -f
Disable the testing mode
nano /etc/csf/csf.conf
//Look for the following line and set testing mode to “0″
TESTING = “0″
//Now restart the firewall!
csf -r
All done and now goto WHM.
In the bottom of the left frame, you’ll see “ConfigServer Security&Firewall” under the Plugings.
Click on the button “Firewall Security Level”
Set into a level you think would be OK.
Then restart button appears. Click on it.
You are DONE!
Source: http://www.mysql-apache-php.com/csf-firewall.htm