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

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *