How to install CSF firewall on CentOS cPanel server

Download and install using:

tar xfz csf.tgz
cd csf

Update the following file with a trusted IP addresses


Go ahead and disable testing mode

sed -i -e 's/TESTING = "1"/TESTING = "0"/g' /etc/csf/csf.conf

Once done, restart your firewall

csf -r

To add your IP address to a permanent allow list use:

csf -a

To block an IP address:

csf -d

Use following to see the lfd logs

tail -f /var/log/lfd.log
Read the rest

How to install csf in Ubuntu or Linux server

CSF is a firewall that can be installed on linux based severs to enhance the security. It can be installed even on a server based on cPanel. It can be configured to find out hacking attempts through ssh etc. Can be used for ip whitelisting and blacklisting.… Read the rest