How to install CSF firewall on Rocky Linux

Categories

How to install CSF firewall on Rocky Linux

You are here:

Introduction

CSF – Config Server Firewall is a free,  flexible and easy to configure firewall compatible with most distributions of Linux. In this short guide we will provide the information how to install and enable it on Rocky Linux.

Install the dependencies

dnf install perl-libwww-perl perl-Math-BigInt wget -y

 

Download CSF files and extract them

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

tar xzf csf.tgz
cd csf

 

Run the installation script

sh install.sh

At this point CSF firewall has been installed and it is ready to use on your server

 

Enable and start csf and lfd services

systemctl enable csf && systemctl enable lfd
systemctl start csf && systemctl restart lfd

 

Check if both services have started with no issues

systemctl status csf
systemctl status lfd
csf -e

 

If you want to uninstall csf from your server run the following:

cd /etc/csf
sh uninstall.sh

 

 

Table of Contents