inside the mind of a linux admin

How to install CSF Firewall on CentOS 7

ConfigServer (CSF) is advanced open-source firewall for Linux. If you are like me, I don’t really care much for the native firewalld that’s included with RHEL7 releases, and I’ve used APF for years which is basically just a frontend for iptables.

Here’s instructions on how to install it:


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
wget https://download.configserver.com/csf.tgz
tar xzf csf.tgz
cd /opt/csf
sh install.sh
cd /etc/csf
rm -rf /opt/csf


5. Test your kernel modules to ensure everything is OK


perl /usr/local/csf/bin/csftest.pl


That’s it, you’re done!


You now have a working CSF installation on your server. You should now know the basics on how to configure it. A good place to start is the config file, located at /etc/csf/csf.conf

For more information, please read the full README file available from the vendor’s website.

Related Posts

ScreenCloud: Troubleshooting missing Python modules after updates

One of my favorite tools that I find myself using quite often is called “ScreenCloud“. It allows you to quickly select any area of your workspace, create an sized screen shot, and then upload it or export it off to their server, your Dropbox account or an SFTP server. If you’ve recently performed upgrades, either […]

Read More

Optimizing a previously large and bloated git repository

In a déjà vu scenario of a previous blog post I authored in 2012 called Source control != File System, I ranted about why binaries do not have any place in a source controlled repository. Fast forward nearly 4 years later, and I’ve once again encountered a repository that was filled with network device firmware […]

Read More

Leave a Reply

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

Twitter: kireguy

Tweeter button Facebook button Myspace button