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.