How to install lfd firewall on linux Cpanel/WHM server through putty commands



Before the installation of firewall you must check whether pearl modules are installed or not! you must login to your server as root through putty and then use below given command to check and install pearl modules

yum install -y perl-libwww-perl

Then downland csf from the website http://www.configserver.com through these commands

cd /usr/local/src
wget http://www.configserver.com/free/csf.tgz

Then you must unpack files using this command

tar -zxvf csf.tgz

Here are the final steps of installation.

cd csf

sh install.sh

Then you must clean up source install files using this command

rm -Rf /usr/local/src/csf* && cd

If you want to backup the original CSF file then use below command

cp /etc/csf/csf.conf /etc/csf/csf.conf.bak

You can also edit the configuration files of firewall through running this command

nano -w /etc/csf/csf.conf

Now firewall on your dedicated server is installed, you may view it on the interface of WHM/Cpanel here Main >> Plugins >>ConfigServer Security&Firewall


After installation of fire wall, it is running on test mode by default, you need to make it active by clicking on the option firewall configuration, here you will find the first option as Testing=1 do make it testing=1 then your fire wall would be active and running.
Then there is a time to istall csf+lfd to your server, use below command to install

cd csf
./install.sh

Add a Comment

*