Please note: This website includes an accessibility system. Press Control-F11 to adjust the website to people with visual disabilities who are using a screen reader; Press Control-F10 to open an accessibility menu.

Fix cPHulk Brute Force Protection lock out

In this article Iโ€™m going to show you how you can fix a cPHulk Brute Force Protection lock out that you might have accidentally triggered.

Itโ€™s my server, why would cPHulk block me?

If youโ€™ve read my previous article on how to enable cPHulk Brute Force Protection, then you should already know that cPHulk blocks login access to core cPanel services for a set amount of time. In some cases you might have kept trying to type in your password incorrectly, and inadvertently got yourself blocked by cPHulk.

Of course you can add your own IP address to the cPHulk white list to prevent failed login attempts coming from your IP to trigger a cPHulk blocking. But if youโ€™ve already gotten yourself blocked, then youโ€™d need to wait the amount of time youโ€™ve set for a block to expire.

In this article Iโ€™m going to explain how to SSH directly to your server to reset the cPHulk data, so that you can regain access again.

Just like itโ€™s required to enable cPHulk Brute Force Protection, you also need root access to your server in order to reset the cPHulk data.

Reset cPHulk data to regain access

  1. Login to your server via SSH as the root user.
  2. Run the following command to see login attempts that have happened:

    mysql -e โ€œselect * from cphulkd.logins;โ€

    In this case we can see that we had some login attempts to an email account user@example.com from the IP address 123.123.123.123:

    +โ€”โ€”โ€”โ€”โ€”โ€”+โ€”โ€”โ€”โ€”โ€”+โ€”โ€”โ€”+โ€”โ€”โ€“+โ€”โ€”โ€”โ€”โ€”โ€”โ€”+
    | USER | IP | SERVICE | STATUS | LOGINTIME |
    +โ€”โ€”โ€”โ€”โ€”โ€”+โ€”โ€”โ€”โ€”โ€”+โ€”โ€”โ€”+โ€”โ€”โ€“+โ€”โ€”โ€”โ€”โ€”โ€”โ€”+
    | user@example.com | 123.123.123.123 | mail | 0 | 2013-02-27 13:04:25 |
    | user@example.com | 123.123.123.123 | mail | 0 | 2013-02-27 13:04:29 |
    | user@example.com | 123.123.123.123 | mail | 0 | 2013-02-27 13:04:39 |
    | user@example.com | 123.123.123.123 | mail | 0 | 2013-02-27 13:04:41 |
    | user@example.com | 123.123.123.123 | mail | 0 | 2013-02-27 13:04:48 |
    | user@example.com | 123.123.123.123 | mail | 0 | 2013-02-27 13:04:54 |
    +โ€”โ€”โ€”โ€”โ€”โ€”+โ€”โ€”โ€”โ€”โ€”+โ€”โ€”โ€”+โ€”โ€”โ€“+โ€”โ€”โ€”โ€”โ€”โ€”โ€”+

  3. Next run the following command to find detected bruce force attempts:

    mysql -e โ€œselect * from cphulkd.brutes;โ€

    Here we can see that those email account login attempts cause a brute force block on the IP:

    +โ€”โ€”โ€”โ€”โ€”+โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€“+โ€”โ€”โ€”โ€”โ€”โ€”โ€”+โ€”โ€”โ€”โ€”โ€”โ€”โ€”+
    | IP | NOTES | BRUTETIME | EXPTIME |
    +โ€”โ€”โ€”โ€”โ€”+โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€“+โ€”โ€”โ€”โ€”โ€”โ€”โ€”+โ€”โ€”โ€”โ€”โ€”โ€”โ€”+
    | 123.123.123.123 | 5 failed login attempts to account user@example.com (mail) โ€” Large number of attempts from this IP: 123.123.123.123 | 2013-02-27 13:04:54 | 2013-02-27 13:09:54 |
    +โ€”โ€”โ€”โ€”โ€”+โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€“+โ€”โ€”โ€”โ€”โ€”โ€”โ€”+โ€”โ€”โ€”โ€”โ€”โ€”โ€”+

    If you wanted to, you could simply wait until the EXPTIME which is the expiration time that the block will expire, and then youโ€™ll be able to login again.

  4. If you wanted to go ahead and clear out the block, and regain access right away, then you can run the following commands to re-allow access for the 123.123.123.123 IP address:

    mysql -e โ€œdelete from cphulkd.logins where IP=โ€™123.123.123.123โ€ฒ;โ€
    mysql -e โ€œdelete from cphulkd.brutes where IP=โ€™123.123.123.123โ€ฒ;โ€

You should now understand how you can reset your cPHulk data so that you can regain access to your core cPanel services in the event you accidentally got yourself locked out.

InMotion Hosting Contributor
InMotion Hosting Contributor Content Writer

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting

9 thoughts on โ€œFix cPHulk Brute Force Protection lock outโ€

  1. this happened to me today, I got locked out of WHM by Hulk, but what I found was a much easier way for me to get access is use a VPN โ€“ I use TunnelBear โ€“ simply just choose a different location and thats it you can SSH, FTP, login and then can reset and fix everything.

    1. It appears that MySQL is able to be implemented with their services. However, cpHulk may not be.

Was this article helpful? Join the conversation!