How to Install CSF and LFD In Linux Servers

How to Install CSF and LFD In Linux Servers

Firewall plays an important role in the protection of the server. Firewall protects the servers against harmful stuff. Firewall controls the incoming and outgoing traffic by analyzing the packet and determine whether they are allowed through or not based on set of rules. In Linux we uses IPTABLES to manage the firewall rules. But its complicated to work with and understand IPTABLES.

CSF – Config Server Firewall is a advanced, powerful and more flexible. CSF is easy to install and configure.

Steps to Install CSF:

1. Change to the temporary directory.

cd /tmp/

2. Download the csf packages on your server

wget http://www.configserver.com/free/csf.tgz

3. Extract the packages from the tar file.

tar -xzf csf.tgz

4. cd to the csf directory.

cd csf

5. Now run the installation scripts.

sh install.sh

6. Once the installation is finished, disable the testing mode by editing the configuration file in any text editor:

vi /etc/csf/csf.conf

and change

TESTING = “1″ to TESTING = “0″ 

7. After making the changes in the configuration file, save the file and exit.

8. Now restart the csf to reflect the changes.

csf –r

9. If you have installed APF earlier then disabled APF + BFD as well.

sh /usr/local/csf/bin/remove_apf_bfd.sh

Uninstall CSF:

To uninstall the csf from server simply perform the following step:

cd /etc/csf/
sh uninstall.sh

It will remove csf firewall from your server.