Today let us learn how to install and configure CSF on CentOS 7.

ConfigServer Security & Firewall (CSF) is a Stateful Packet Inspection (SPI) firewall, login/intrusion detection, and security application for Linux servers provided by ConfigServer.

 

First, we need to install prerequisites, Perl and libwww.

# yum install perl-libwww-perl -y

 

Now, download CSF

# cd /usr/src
# wget https://download.configserver.com/csf.tgz

 

Extract it

# tar xzf csf.tgz
# cd csf

 

Run the installation script

# sh install.sh
# perl /usr/local/csf/bin/csftest.pl

 

Output:

 

This will run the installation script and check all the dependencies are installed and create the necessary directory. Also, test whether you have the required iptables modules.

 

That’s it. Now, we can then configure csf and lfd.

 

Open config file using your favorite editor

# vim /etc/csf/csf.conf

 

And change TESTING = "1" to TESTING = "0" or else lfd daemon fail to start. Also, you can allow incoming and outgoing port as per your requirement.

 

Once you're done with all the configuration, restart and enable CSF

# systemctl restart csf && systemctl restart lfd
# systemctl enable csf && systemctl enable lfd
# systemctl status csf && systemctl status lfd

 

Check the version

# csf -v

Output:
csf: v13.08 (generic)

 

In case you want to allow the incoming connection from an IP address

# csf -a [IP Address]

 

In case you want to deny the incoming connection from an IP address

# csf -d [IP Address]

 

To uninstall the CSF completely is very easy:

# cd /etc/csf
# sh uninstall.sh

 

Hope you did understand, how our Support Engineers install and configure CSF on CentOS 7 Linux server.

 

[Need assistance on installation with CSF on CentOS 7? We’ll help you.]

¿Fue útil la respuesta? 0 Los Usuarios han Encontrado Esto Útil (0 Votos)