Follow

Clearing cpHulk in cPanel

  • Applies to: VPS Hosting
    • Difficulty: Medium
    • Time Needed: 10
    • Tools Required: SSH access

Overview

From time to time, your VPS will come under attack. If your VPS is has cPanel, there is an IP address blocking service simply called cpHulk that is used to block those brute force attacks. However, as effective as it is, this service can also lock you out, even if you are using the correct password. The following will help address that problem and help you keep being able to login, even when cpHulk does its job.

READ ME FIRST
This article is provided as a courtesy. Installing, configuring, and troubleshooting third-party applications is outside the scope of support provided by (mt) Media Temple. Please take a moment to review the Statement of Support.

Instructions

  1. First, you must obtain your IP address. You can get that from http://whatismyip.com. Please write down the IP address that it shows you.
  2. Login to SSH (command line) as the root user.
  3. Once you are logged in, you'll need to access MySQL. So, at the prompt, type the following and press Enter:
    sudo mysql
  4. Now that you have accessed MySQL, you must access the cphulkd database. So, at the MySQL prompt, type this:
    use cphulkd;
  5. Now that you have accessed the cphulkd database. At the MySQL prompt, type these commands, one after the other. The "255"'s in the first command need to be replaced with the IP address you wrote down from http://whatismyip.com. Everything else remains as is:
    INSERT INTO whitelist values ('255.255.255.255',0);
    DELETE FROM logins;
    DELETE FROM brutes;
  6. Once you have done all that, type in:
    exit
  7. Once you are at your regular command prompt, you will need to restart the cpHulk service. So, type in the following and press Enter:
/usr/local/cpanel/etc/init/stopcphulkd && /usr/local/cpanel/etc/init/startcphulkd

And with that, you are finished! You have now whitelisted your IP address, so that even if cpHulk "locks the door", you can still get in from your location.

Was this article helpful?
1 out of 1 found this helpful

Comments