cPHulk – Whitelist an IP address on command line to access locked WHM

August 3, 20151 Minutes

So you are new to cPanel, everything is working ok and then suddenly you can’t login to your server’s WHM.

Most likely causing it, is cPanel’s cPHulk locking your IP access to WHM.

Good practice is to have your IP(s), where you would be accessing WHM, whitelisted on cPHulk upon WHM’s initial configuration. This may though, pose an issue depending on your ISP’s setup, wherein your IP address may dynamically change periodically.

Also, there is a chance that you may have to access your WHM from a different location, with an IP not on cPHulk’s whitelist.

To work around on this, you can SSH to your server, sudo to super user, then on the command line, you can add your current IP to the cPHulk’s whitelist.

# /scripts/cphulkdwhitelist your_ip_address

Take note for GoDaddy’s cPanel powered Virtual Dedicated Servers, you’ll have to add first your server user account to the sudoer’s list at the VPS’s server management console to grant the user sudo to superuser privilege.

If you are locked out of your cPanel’s webmail, cPHulk might also be the culprit. cPHulk protects the mail services if you are using Dovecot as your mailserver for your cPanel instance.

For more details, you can check out cPHulk’s documentation at – https://documentation.cpanel.net/display/ALD/cPHulk+Brute+Force+Protection