How To “Unblock” an IP from cPHulk from the Command Line

cPHulk uses a MySQL database to keep track of different IP’s to block, white list, black list, etc.

When there have been X amount of failed login attempts from an IP, cPHulk adds an entry for the IP in the brutes table.

To “unblock” the IP we need to delete the entry.

open up the cPHulk MySQL database.

root@localhost [~]# mysql cphulkd

If your interested you can view all tables that cPHulk uses.

show tables;

Take a look at all the IP’s in the brutes table.

SELECT IP FROM brutes;

example:

mysql> SELECT IP FROM brutes;
+---------------+
| IP            |
+---------------+
| 30.134.41.221 |     <--  IP we want to unblock
| 31.134.40.251 |
+---------------+
2 rows in set (0.00 sec)

mysql>

To unblock the IP we just need to delete the row that has the IP address we want.

mysql> DELETE FROM brutes WHERE IP="30.134.41.221";

It should return the following.

mysql> DELETE FROM brutes WHERE IP="30.134.41.221";
Query OK, 1 row affected (0.00 sec)

mysql>

Exit MySQL.

mysql> exit
Bye
root@localhost [~]#