Skip to content

Instantly share code, notes, and snippets.

@u007
Last active June 15, 2016 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save u007/3cbffc3424cc8230bd75c81c14a448f3 to your computer and use it in GitHub Desktop.
Save u007/3cbffc3424cc8230bd75c81c14a448f3 to your computer and use it in GitHub Desktop.
cpanel cphulk unban ip
# login as root, and mysql into cphulkd
sudo su
mysql cphulkd
# see blocked / history
select user, INET6_NTOA(address) as address1, service, type, logintime, notes, authservice from login_track where INET6_NTOA(address) like ‘%:-ip here-';
select user, INET6_NTOA(address) as address1, service, type, logintime, notes, authservice from login_track order by logintime desc limit 30;
select user, INET6_NTOA(address) as address1, service, type, logintime, notes, authservice from login_track where type < 0 order by logintime desc limit 30;
# unblocking
delete from login_track where INET6_NTOA(address) like '%:-ip here-' ;
# type:
-1 : login fail
-2 : blocked
# see ip lists
select INET6_NTOA(`STARTADDRESS`), INET6_NTOA(`ENDADDRESS`), `TYPE` from `ip_lists` limit 10;
# warning & disclaimer
# Use at your own risk.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment