How to install CSF firewall for Cpanel?

CSF is a common used software firewall for linux based on iptables. They have a plugin available for Cpanel and we'll explain you how to install.
First make sure you are logged in as root and have no other firewall installed.

- Download the CSF files:

# wget

- Extract the files on your server and enter the csf directory:

# tar -xvf csf.tgz && cd csf

- Install CSF for Cpanel:

# sh

That's it, CSF has now been installed! You will notice it will show CSF on the left bottom side of your WHM so you can manage it from within Cpanel / WHM.

Remark: by default, the CSF firewall is running in 'testing' mode, you have to alter it by editing the file '/etc/csf/csf.conf' by changing TESTING = "0" into TESTING = "1"

  • 29 Users Found This Useful
Was this answer helpful?

Related Articles

How to update your cpanel license?

If your Cpanel (trial) license is expired and your new license is activated, you have to update...

How do I install Cpanel in CentOS?

You can install Cpanel on CentOS 5 or CentOS 6 by logging in as 'root' user via SSH.   -...

How do I create an account in Cpanel?

You can add a new Cpanel account as followed:1. Login to WHM via https://YOUR_IP:2087* replace...

What ports do I need to open in my firewall for Cpanel?

If you install a firewall in Cpanel, it is recommended on opening the following default ports:TCP...