
ConfigServer Security & Firewall (CSF) is a robust suite of scripts that offers:
A straightforward SPI iptables firewall script
A daemon process for monitoring Login Authentication
A user-friendly Control Panel configuration interface
...and more!
This tutorial is designed using our "CentOS 7 + DirectAdmin" template, ideal for our self-managed virtual private servers (VPS).
Preliminary Requirements:
1. CSF Installation:
Installing CSF is simple since it’s preconfigured for DirectAdmin. Follow these steps:
cd /usr/src
wget https://download.configserver.com/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh
2. CSF Configuration:
After installation, CSF starts in testing mode. Here’s what you need to do next:
Log in to your DirectAdmin panel (default URL: http://your-server-ip:2222).
Go to "ConfigServer Firewall & Security".
You’ll see two notices that need your attention. To address them:
Turn off testing mode: Select "ConfigServer Firewall" > "Firewall Configuration", then disable testing mode.
Restrict syslog/rsyslog access: Update the required settings.
After making these changes, click "Change" at the bottom of the page and then "Restart csf+lfd".
Your ConfigServer firewall is now fully operational. For more information, visit the CSF Read Me page.