CSF is one of the best firewalls out there that will provide an extra layer of security for your Linux server. Follow the below steps to install CSF and LFD.
Go to “/opt”, download the latest CSF source files, and untar it.
cd /opt wget http://www.configserver.com/free/csf.tgz tar -xvf csf.tgzcd csf
Execute the “install.sh” shell script to install the CSF.
./install.sh
Next, test whether you have the required iptables modules:
perl /etc/csf/csftest.pl
If you have any APF or BFD firewalls installed in your system, you can run the below command to uninstall it. ( Otherwise, there will be conflict. )
sh /etc/csf/remove_apf_bfd.sh
By default, CSF will be running in “test” mode. Please follow the below steps to disable “test” mode and to make CSF fully functional.
Edit the CSF main configuration file.
vi /etc/csf/csf.conf
You can find the below lines.
TESTING = "1"
Change it as follows.
TESTING = "0"
Now restart CSF, LFD, and IPtables to update the changes.
/etc/init.d/csf restart /etc/init.d/lfd restart /etc/init.d/httpd restart
That’s it!! You have Installed and configured CSF and LFD in your system.
If you find any difficulty following the steps, please do let us know and we will be right here for your help.