Install 🛡️ CSF Firewall on RHEL / CentOS 8

Install 🛡️ CSF Firewall on RHEL / CentOS 8

ConfigServer (CSF) is advanced open-source firewall for Linux and here is how to install it on CENTOS 8

1. Disable firewalld

systemctl stop firewalld
systemctl disable firewalld
systemctl mask firewalld

2. Install iptables

yum -y install iptables-services
touch /etc/sysconfig/iptables
touch /etc/sysconfig/ip6tables

3. Start and enable the iptables service

systemctl start iptables
systemctl start ip6tables

systemctl enable iptables
systemctl enable ip6tables

4. Install CSF and its dependencies

yum -y install perl perl-libwww-perl net-tools wget perl-GDGraph perl-LWP-Protocol-https
cd /opt
tar xzf csf.tgz
cd /opt/csf
cd /etc/csf
rm -rf /opt/csf

5. Test your kernel modules

perl /usr/local/csf/bin/

That’s it, you’re done!

The basics on how to configure it are in the config file, located at /etc/csf/csf.conf and for more information read the full README file.

Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.