CSF (ConfigServer Security & Firewall) is the most popular firewall for cPanel servers — it provides iptables management, brute force detection and WHM integration.
Install CSF
cd /tmp && wget https://download.configserver.com/csf.tgz
tar -xzf csf.tgz && cd csf && sh install.sh
Configure
nano /etc/csf/csf.conf
TESTING = "0"
TCP_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995,2082,2083,2086,2087"
LF_TRIGGER = "10"
LF_ALERT_TO = "[email protected]"
Whitelist Your IP
echo "YOUR_IP # Office IP" >> /etc/csf/csf.allow
csf -r
Common Commands
csf -d 192.168.1.1 "Blocked" # Block IP
csf -a 192.168.1.1 # Allow IP
csf -dr 192.168.1.1 # Unblock IP
csf -g 192.168.1.1 # Check IP
csf -l # List rules
Conclusion
CSF provides comprehensive firewall protection for cPanel servers. Our team configures CSF and server security hardening.
Comments