Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anyone know how to define a range of IPs to blacklist in the cPHulk Brute Force attack settings?

I am getting bombarded from IPS 103.26.193.* and 103.26.194.*

I Googled it and cannot find specific instructions or settings on IP Ranges

Step 1 - Entering a range with asterisk (*): enter image description here

Step 2 - Updated the Blacklist (unsuccessfully): enter image description here

Follow @rholmes answer below and use these settings to block Foreign Hackers:

To complete the loop on buttoning your server down, refer to my other question here --> Do cPHulk Brute Force Protection Settings Effect Hosts?

share|improve this question

closed as off-topic by EEAA, Andrew Schulman, Katherine Villyard, mdpc, masegaloeh May 22 '15 at 2:40

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

I just want to thank you, I got a new dedicated server and I wanted to kill them all before they started. I was getting maximum failed attempts by about 20 IPs per day in the only 1.5 days I have had cPanel running. So I thought, "why don't I just block ALL countries from accessing my cpanel, except my own IP"? So I googled and found your list. Should do the trick! THANK YOU! :) – serveraddict Oct 26 '14 at 17:39
up vote 5 down vote accepted

In the interface for cPHulk, you can wild-card with the following IPv4 address ranges (in notation used by CIDR or Classless Inter-Domain Routing):

103.26.193.* should be specified in cPHulk as:
103.26.*.* should be specified in cPHulk as:
103.*.*.* should be specified in cPHulk as:

This can be done at the command line or via the WHM interface.

The notation for wild-carding the IP addresses derives from the fact that an IP address is often represented as a 32-bit unsigned integer. For better human readability, we divide this into 4 8-bit bytes separated by dots (dot notation).

In the wild-card notation, the number following the slash indicates how many of the higher-order bits should be considered significant. The examples above show, in order, cases where the first 24 bits (three bytes), 16 bits (2 bytes), and 8 bits (1 byte) are considered significant.

Similar wild-carding / address block notation is specified for IPv6 as well.

If cPHulk is coded correctly, we should even be able to split one of the bytes at an arbitrary bit boundary (but I haven't tested this). The notation should support it.

For more information on the details, one can start with some of the following links:

Wikipedia: Classless Inter-Domain Routing

IPv4 Classes, Subnets, Netmasks, CIDR and NAT

Wikipedia: IP Address

share|improve this answer
Thanks @rholmes...see my amended OQ where I posted screen shots. Interface is cPanel/WHM itself. – H. Ferrence Feb 13 '14 at 17:48
This solution will work in your situation. Hope that helps! – rholmes Feb 16 '14 at 22:25
Hmm… It appears to work for me… Which version of WHM are you using, and how many are you trying to block? I typically use the style (to avoid over-blocking) but I've taken to attempting larger ranges. How is it that you're determining it doesn't work -- you still get failure attempts from the blocked IPs? Updated answer for clarity... – rholmes Feb 17 '14 at 3:54
You should enter "" instead. That should wild-card the last digit of the IP. To wildcard the last two, "". – rholmes Feb 18 '14 at 13:01
I just edited the answer to provide additional background without too much detail, I hope... – rholmes Feb 18 '14 at 21:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.