Overview: ConfigServer Security & Firewall (CSF) is the most powerful security plugin for WHM. It protects your VPS from brute-force attacks, unauthorized login attempts, and malicious IP addresses.
Essential Configuration Steps:
Log in to WHM as root.
Go to Plugins -> ConfigServer Security & Firewall.
Click on "Firewall Configuration".
Testing Mode: Ensure TESTING is set to 0 once you are sure of your settings; otherwise, the firewall will stop every 5 minutes.
Port Management: Check TCP_IN and TCP_OUT to ensure only necessary ports (like 80, 443, 2087) are open.
Login Failure Blocking: Look for LF_DAEMON and set it to On. This will automatically block IPs that fail to log in multiple times.
Click Change at the bottom and then Restart csf+lfd.
Quick Action: To whitelist your own IP so you don't get locked out, use the "Quick Allow" box on the main CSF page and enter your IP.