How to install CSF firewall on CentOS cPanel server

Download and install using:

wget https://download.configserver.com/csf.tgz
tar xfz csf.tgz
cd csf
sh install.sh

Update the following file with a trusted IP addresses

/etc/csf/csf.allow

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 11.22.33.44

To block an IP address:

csf -d 11.22.33.44

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 *