In this tutorial, I will explain the simple tutorial for installing the csf as a Plugin in the WHM/Cpanel
1. Connect using SSH to the VPS as root
2. Download the installation file :
# wget http://www.configserver.com/free/csf.tgz
3. Extract the downloaded file :
# tar -xzf csf.tgz
4. Remove the downloaded file :
# rm -rf csf.tgz
5. Change to the csf directory, and install it :
# cd csf
# sh install.sh
Just in case you want to uninstall csf, use the following command :
# cd /etc/csf
# sh uninstall.sh
6. Login to the WHM/Cpanel, and go to Plugins – ConfigServer Security & Firewall
7. Click on the Firewall Configuration, find and modify it using the following values :
TESTING = 0
AUTO_UPDATES = 1
TCP_IN = add the port that you will use for the ssh connection
UDP_IN = add the port that you will use for the ssh connection
LF_SCRIPT_ALERT = 1
PT_ALL_USERS = 1
8. After that, click the “Change” button in the bottom of the csf configuration
9. Click Restart csf +lfd
10. Click Return
11. Click on the “Check server security”
12. Secure your VPS server as stated in the red color.