Allow-listing a trusted IP — your office, a VPN exit, a monitoring service, a developer’s static address — is the standard way to stop a known-good source from ever being blocked. The catch on cPanel is that there are two independent gates, and whitelisting one does nothing for the other. CSF is the firewall; its allow list exempts an IP from LFD blocks. cPHulk is the login brute-force protector; it has its own whitelist that exempts an IP from login-failure lockouts. An operator IP that needs to reach both SSH and WHM usually has to be on both lists. Getting this right is also what saves you from locking yourself out.
What’s happening
CSF and cPHulk solve different problems and keep separate state. CSF/LFD watches network traffic and login-failure logs and adds offending IPs to temporary or permanent blocks. Its allow list — /etc/csf/csf.allow — marks an IP as trusted so LFD will not block it, no matter how many failures it generates. cPHulk watches authentication attempts to cPanel, WHM, SSH, FTP, and mail, and locks out an IP (or username) that exceeds its thresholds. Its whitelist is stored separately and managed in WHM or via the API.
The practical consequence: if you only add your IP to CSF, cPHulk can still lock you out after a few mistyped WHM passwords; if you only whitelist it in cPHulk, CSF/LFD can still ban it for a port flood or other trigger. For a management IP, the safe default is to whitelist it in both. The flip side — and a real risk — is that an over-broad allow list weakens protection, so allow-listing should be limited to a small, known set of addresses you control, never a customer’s dynamic home IP or a broad range.
How to verify
Check what each gate currently considers trusted, and confirm the IP’s status across both:
# CSF: is the IP already allow-listed, and what is its overall status?
grep 203.0.113.10 /etc/csf/csf.allow
csf -g 203.0.113.10
# cPHulk: list the current whitelist entries
whmapi1 read_cphulk_records list_name=white
Confirm both services are actually enabled (a whitelist on a disabled service is moot, and tells you which gate is even in play):
# Is CSF enforcing (not TESTING) and running?
grep -E '^TESTING' /etc/csf/csf.conf
csf -l | head
# Is cPHulk enabled at all?
whmapi1 get_cphulk_config | grep -i is_enabled
/usr/local/cpanel/scripts/restartsrv_cphulkd --status
After making changes, re-run csf -g 203.0.113.10 and read_cphulk_records list_name=white to confirm the IP now appears as allowed on both. A csf.allow line plus a cPHulk white entry for the same address is the state you want for an operator IP.
The fix
- Add the IP to CSF’s allow list — the firewall side. Run
csf -a 203.0.113.10 "office static", which writes the entry to/etc/csf/csf.allowwith a comment and reloads. Allow-listed IPs are exempt from LFD blocks, so failed logins from this address will not get it banned. Use the comment field to record who/what the IP is — future-you will want it. - Whitelist the IP in cPHulk separately — the brute-force side, which CSF does not cover. In WHM » Security Center » cPHulk Brute Force Protection » Whitelist Management, add the address, or via API:
whmapi1 create_cphulk_record list_name=white ip=203.0.113.10. This exempts it from login-failure lockouts on WHM/SSH/cPanel. - Do both for any management IP — for an address that needs SSH and WHM access, put it on both lists. This is the single most effective protection against locking yourself out: a few fat-fingered passwords from a whitelisted operator IP can never trigger a block on either gate.
- Use a CIDR range only when truly needed — if a whole office subnet must be trusted, CSF accepts CIDR (
csf -a 203.0.113.0/28). Keep ranges as small as possible; a/24of a coworking space or VPN provider trusts far more hosts than you intend. Prefer single/32addresses where you can. - Allow-list monitoring and uptime checkers deliberately — health checks and uptime monitors hammer the server on a schedule and routinely trip
CONNLIMIT/PORTFLOODor login thresholds. Add their published IPs tocsf.allow(and cPHulk if they authenticate) so legitimate monitoring is not treated as an attack. - Keep the allow list small and reviewed — every allow-listed IP is an exception to your protection. Review
csf.allowand the cPHulk whitelist periodically and remove stale entries (a former employee’s home IP, a decommissioned VPN). An allow list that only grows is a quiet erosion of the firewall. - Never allow-list a customer’s dynamic IP as a fix — it is tempting to whitelist a customer who keeps getting blocked, but a residential dynamic IP changes and may later belong to someone else, and it exempts them from real protection. Solve their lockout by tuning thresholds or fixing their credential, not by trusting a transient address.
- Reload and verify from the trusted IP itself — after editing either list, CSF reloads on
csf -a; for manual edits tocsf.allowruncsf -r, and cPHulk changes apply immediately. Then confirm from the actual whitelisted location that SSH and WHM connect without challenge — the definitive test of both gates.
The rule of thumb: two gates, two lists, and a deliberately short roster of addresses you genuinely control. Stack Harbor maintains firewall and brute-force allow lists under WHM server management — start a conversation to set up operator access that never locks you out.