To install CSF from your server, you may use the following command.
mkdir /tmp/;cd /tmp/;wget http://www.configserver.com/free/csf.tgz;tar zxf csf.tgz;cd csf;sh install.sh;
Once you finished install, you can either edit the configuration file from WHM with step below.
WHM >> Plugins >> “Config Server Security and Firewall” option.
If you do not have WHM (cPanel) installed, you may configure the setting from /etc/csf/ folder. And the CSF configuration stored from /etc/csf/csf.conf.
Extra configuration will be as below:
-If you would like to disable APF+BFD,run the following command.
CSF is pre configured to work on a cPanel server with all the standard cPanel ports open. It also auto-configures your SSH port if it’s non-standard on installation.
Once you make the required changes to your CSF configuration file and are sure, you are not going to block yourself out, change the following from /etc/csf/csf.conf from
TESTING = “1″
TESTING = “0″
and restart the csf firewall using command below:
To uninstall csf and lfd is even more simple.
cd /etc/csf;sh uninstall.sh