Securing your server using CSF (ConfigServer Security & Firewall) goes far beyond just RESTRICT_SYSLOG. Below is a comprehensive, security-hardened configuration guide for your WHM server running CSF v14.24, including:
-
Must-change core firewall settings
-
Brute-force protection (LFD)
-
Process tracking
-
Port security
-
Email alerts
-
Bonus hardening settings
๐ 1. Log Access Protection
โ Set:
โ Optional:
๐ 2. Brute Force Protection (LFD)
These settings help defend against login attacks for SSH, cPanel, WHM, email, etc.
โ Basic brute force protection
โ Permanent block for known bad behavior:
๐ง 3. Process Tracking (Anti-Exploit)
Detect and kill suspicious or excessive processes (common in shell injection attacks).
โ Enable process tracking
๐ 4. Port Security
โ Block unused ports (very important)
-
Edit this section:
โ ๏ธ Only open what you use! Close FTP if unused (
20,21
), or SMTP if using remote mail.
๐ก 5. Connection Tracking
Protects against DoS or too many concurrent connections.
โ Recommended:
๐ง 6. Email Alerts
โ Enable admin notifications:
Set your email at:
๐ 7. Directory Watching & Suspicious File Alert
โ Recommended:
๐งฑ 8. Firewall Rate Limiting
Mitigate port scanning and malicious scanning tools.
โ SYN flood protection:
๐ซ 9. Disable Ping (optional)
You can block ping requests (ICMP):
โ ๏ธ Note: If you monitor uptime externally (e.g. Pingdom), keep this enabled.
๐งน 10. Clean Up and Audit
โ Block users from compiling code (useful in shared hosting):
โ Disable IP spoofing and fragment attacks:
๐ค Backup Configuration
After applying all settings:
-
Scroll to the bottom
-
Click “Change” and then “Restart csf+lfd”
-
Go back to the main CSF page
-
Use “Backup firewall configuration” to export your setup
๐งช Final Tips
-
Use csf -r from SSH if WHM GUI hangs.
-
Regularly check /var/log/lfd.log for alerts and tune as needed.
-
Pair CSF with ModSecurity and ClamAV for full-stack protection.