The short answer
Enable cPHulk in WHM, review its settings, and apply recommended thresholds. Then test login attempts to confirm that repeated failures trigger block actions, protecting your accounts from brute‑force attacks.
What is cPHulk and why it matters
cPHulk is a built‑in brute‑force protection system that monitors failed login attempts across SSH, FTP, cPanel, WHM and other services. It blocks IP addresses that exceed a configurable threshold, preventing attackers from guessing credentials repeatedly and reducing the risk of account compromise.
By automatically throttling or banning abusive IPs, cPHulk protects both the server and the hosted sites. It logs each blocked attempt, allowing administrators to review patterns and adjust thresholds. This proactive defense keeps services available and reduces the need for manual intervention during credential‑guessing attacks.
How to check if cPHulk is already enabled
To see if cPHulk is active, log into WHM and go to the Security Center section. The cPHulk tab will display its status. If it says "Enabled" or shows a green checkmark, the protection is running. If the tab is missing or shows a red cross, cPHulk is not enabled and you need to activate it from the same interface.
If you prefer a quick command line check, you can look at the cPHulk configuration file. The file /etc/cphulkd/cphulkd.conf contains a line that reads enabled = 1 when the daemon is active. You can view it with a safe read command. This confirms the daemon is set to start on boot and is listening for login attempts.
# View the cPHulk configuration safely
sudo cat /etc/cphulkd/cphulkd.conf | grep enabledLook for the line "enabled = 1". If it is set to 0, cPHulk is disabled.
Step‑by‑step setup of cPHulk in WHM
Log in to your WHM interface as the root user. Navigate to the Security Center section and select cPHulk Brute Force Protection. Ensure the service is enabled by checking the box labeled Enable cPHulk. You can adjust the fail count threshold to define how many failed login attempts trigger a block. Lower values provide stricter protection but may increase false positives for legitimate users with poor connectivity.
Configure the ban period to match your security policy. A standard setting is twenty-four hours, but you can increase this for persistent attackers. Review the exclusion list to ensure critical IP ranges or monitoring tools are not blocked. Save your changes to apply them immediately. The system will now automatically monitor login attempts and ban offending IPs based on your defined criteria.
- Set the fail count to a reasonable number, such as five or ten.
- Define a ban duration that balances security and user convenience.
- Add trusted IP addresses to the exclusion list to prevent false bans.
- Check the block list regularly to identify potential attack patterns.
tail -n 20 /var/log/cphulkd.logAfter saving your settings, verify that cPHulk is running by checking the service status in WHM. Monitor the log file to ensure that failed login attempts are being recorded and that IPs are being banned as expected. If you notice legitimate users being blocked, adjust the fail count or add their IPs to the exclusion list.
What to avoid when configuring cPHulk
When configuring cPHulk, avoid setting the login failure thresholds too low. An aggressive limit, such as locking an IP after just two failed attempts, can lock out legitimate users who mistype passwords or use password managers that retry. This creates unnecessary support tickets and can disrupt business operations. Instead, choose a threshold that balances security with normal user behavior, and consider extending the lockout duration only after repeated offenses.
Never disable cPHulk entirely as a quick fix for lockout issues. Turning the feature off removes a critical layer of brute‑force protection and leaves the server exposed to automated attacks. If you encounter false positives, adjust the whitelist, trusted IPs, or threshold settings rather than disabling the module. Always test changes on a non‑production environment or take a snapshot before applying them to live servers.
- Set thresholds too low, causing frequent lockouts.
- Whitelist only trusted IPs; avoid overly broad ranges.
- Ignore the lockout notification log; it provides useful clues.
- Disable cPHulk to bypass problems; this removes protection.
- Forget to back up the cPHulk configuration before major changes.
After applying the changes, monitor the cPHulk login failure log and the WHM security alerts. Confirm that legitimate users can log in without unexpected blocks while repeated failed attempts are still being recorded and blocked.
How to keep cPHulk effective over time
cPHulk is a powerful tool, but it only stays strong if you keep it up to date. Start by checking the cPHulk log file at /var/log/cphulkd.log once a week. Look for patterns such as repeated failed logins from the same IP or new usernames that never appear in your user database. If you see a new source of failures, add a custom rule to block that IP or adjust the threshold for that user. Regularly review the list of blocked IPs in WHM’s “cPHulk Brute Force Protection” section to ensure legitimate traffic isn’t being denied. Updating the rule set is equally important. cPHulk uses a set of default rules that are updated with each cPanel/WHM upgrade. Run yum update cpanel or the equivalent for your distro to pull the latest rule set. After the update, run cphulkd -u to reload the rules. This keeps the protection current against new attack patterns. Finally, back up your WHM configuration before making any changes, so you can revert if something unexpected happens.
cPHulk’s effectiveness relies on timely updates and clear visibility into its logs. By monitoring /var/log/cphulkd.log and keeping the rule set current, you prevent attackers from slipping through outdated filters. Keep a copy of the log and the rule configuration so you can audit changes over time.
# View the latest 50 lines of the cPHulk log
# Example: less /var/log/cphulkd.log
# Reload cPHulk rules after an update
# Example: cphulkd -uAfter running the commands, check that the log shows no new failed login attempts from previously blocked IPs and that the rule reload succeeded without errors.
Troubleshooting cPHulk issues
If cPHulk blocks legitimate users, check the logs for false positives. Access WHM and navigate to the cPHulk Exim interface to review recent blocks. You can add specific IP addresses to the whitelist to prevent future blocking. Always verify the user's identity before whitelisting to avoid security gaps. If performance issues arise, ensure your server has adequate resources. cPHulk processes logs in real-time, so heavy traffic can increase CPU usage. Monitor system load to confirm this is the cause.
For persistent false positives, adjust the detection thresholds in the cPHulk configuration. Lowering sensitivity reduces false blocks but may miss some attacks. Test changes in a staging environment first. If performance remains a concern, consider increasing the log rotation frequency to reduce the volume of data processed at once. Keep the cPHulk plugin updated to benefit from bug fixes and optimizations. Document any configuration changes to maintain audit trails and simplify future troubleshooting.
- Access WHM > cPHulk Exim to review blocked IPs and logs.
- Whitelist verified IPs to stop false positive blocks.
- Adjust detection thresholds only after testing in staging.
- Monitor CPU and memory usage during high traffic periods.
# Example commands to check cPHulk logs and status
# Read each command before running it in production
journalctl -u cphulk --since "1 hour ago"
tail -n 50 /var/log/cphulk.log
systemctl status cphulkLook for repeated IP addresses in the logs to identify potential false positives. Check the system load average to ensure cPHulk is not causing high CPU usage. Verify that whitelisted IPs are no longer appearing in the block logs. Confirm that the cPHulk service is running and enabled to start on boot.
Backups and safety precautions
Before enabling or configuring cPHulk in WHM, create a full backup or a snapshot of the server. A snapshot captures the current state of the operating system, configuration files, and data, allowing you to revert quickly if the new settings cause unexpected login blocks or service interruptions. For VPS or cloud instances, use the provider's snapshot feature; for dedicated hardware, take a disk image or use a backup solution that can restore the system to the exact point in time. Having a reliable restore point reduces risk and downtime.
When you have a snapshot, test the cPHulk changes on a non‑production account or during a maintenance window. Verify that legitimate users can still log in and that the firewall rules remain intact. Keep the snapshot for at least a few days after the change, in case you need to investigate logs or roll back due to false positives. Document the snapshot ID and the configuration steps you performed, so the restoration process is clear and repeatable.
- Create a snapshot using the hosting platform's UI or CLI before any WHM change.
- Record the snapshot ID, date, and purpose in a change log.
- Verify login functionality with a test account after enabling cPHulk.
- Keep the snapshot for at least 48 hours before considering it safe to delete.
virsh snapshot-create-as --domain myserver --name pre-cphulk --description "Snapshot before cPHulk configuration" --atomicAfter running the snapshot command, check the output for a success message and confirm the snapshot appears in your virtualization manager. The snapshot should be listed with the name you provided, indicating it is ready for restoration if needed.
If you would rather have engineers do this for you, see Linux server management, Windows server management or emergency malware cleanup.
Questions people ask
How does cPHulk determine when to block an IP?
cPHulk analyzes login failure rates against configurable thresholds. If an IP exceeds the maximum allowed failures within a set time window, it triggers a block. You can adjust these sensitivity levels in WHM to balance security with false positives.
Can I whitelist certain IP addresses in cPHulk?
Yes, you can add trusted IP addresses to the cPHulk whitelist to prevent them from being blocked. This is useful for office networks or specific monitoring tools. Add these IPs in the cPHulk Exclusion List section within WHM to ensure they bypass brute force detection rules.
What logs does cPHulk use to detect attacks?
cPHulk primarily monitors cPanel, WHM, FTP, and SSH login logs. It parses these files to track failed authentication attempts. By analyzing these specific logs, it identifies patterns of repeated failures from single IP addresses, distinguishing them from legitimate user errors.
Will enabling cPHulk affect normal login attempts?
Enabling cPHulk should not affect normal, successful login attempts. It only blocks IPs that exceed the defined failure thresholds. Legitimate users entering correct credentials will not be impacted. However, users who frequently mistype passwords may trigger a temporary block if they exceed the limit.