Linux How To

Install and Configure ConfigServer Security & Firewall (CSF) in CentOS 7&8

Install and Configure ConfigServer Security & Firewall (CSF) in CentOS 7&8 1

Cybersecurity is an important field of study. Making our server that runs web applications or client’s data safe is a big task. Here in this article, I will show you how to install and configure ConfigServer Security & Firewall (CSF).

Installing CSF

To begin, please note that Perl and libwww is a prerequisite to install CSF on any of the supported distributions (RHEL and CentOS, openSUSE, Debian, and Ubuntu).

# yum install perl-libwww-perl
# yum install libwww-perl

Download CSF

# cd /usr/src
# wget

Extract the CSF tarball

# tar xzf csf.tgz
# cd csf

Run the CSF Installation Script

# sh
# perl /usr/local/csf/bin/

The Output will be Like:

Testing ip_tables/iptable_filter...OK
Testing ipt_LOG...OK
Testing ipt_multiport/xt_multiport...OK
Testing ipt_REJECT...OK
Testing ipt_state/xt_state...OK
Testing ipt_limit/xt_limit...OK
Testing ipt_recent...OK
Testing xt_connlimit...OK
Testing ipt_owner/xt_owner...OK
Testing iptable_nat/ipt_REDIRECT...OK
Testing iptable_nat/ipt_DNAT...OK

RESULT: csf should function on this server

Disable Firewall and Configure CSF

# systemctl stop firewalld
# systemctl disable firewalld

Now open /etc/csf/csf.conf (i.e: nano /etc/csf/csf.conf ) and change TESTING = “1” to TESTING = “0”

Restart and Test CSF

# systemctl restart {csf,lfd}
# systemctl enable {csf,lfd}
# systemctl is-active {csf,lfd}

Get more stuff
in your inbox

Subscribe to our newsletter and get interesting stuff and updates to your email inbox.

Bibith K Mathew (born on 29 July 1998) is an Indian Internet entrepreneur. He is best known as the CEO and Managing Director of TalkBate Digital Partners.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.