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
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