How to install CSF firewall on Rocky Linux


How to install CSF firewall on Rocky Linux

You are here:


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

tar xzf csf.tgz
cd csf


Run the installation script


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



Table of Contents