Blacklist ip blocks - ip range?

AI-generated summary

In the discussion “Blacklist ip blocks - ip range?”, users are discussing how to block IP ranges. slivo initially asks if the system supports blocking IP ranges. osioke responds that ranges can be blocked using the format 192.168.0.0/16 in the Screened IP section of the Admin dashboard.

slivo then asks how to block a specific part of an IP pool, e.g., 175.159.64.0 - 175.159.127.255. schleifer suggests using 175.159.64.0/18 to block the specified range. slivo requests an explanation of the methodology.

Falco provides a link to Wikipedia’s Classless Inter-Domain Routing (CIDR) page, and lucasbasquerotto explains the CIDR notation, suggesting the use of online utilities like https://www.ipaddressguide.com/cidr to convert IP ranges to CIDR notation.

Can I block the ip range in this field or only individual IPs ?

You can block or allow ranges using the format 192.168.0.0/16 in the Screened IP section of your Admin dashboard /admin/logs/screened_ip_addresses

What if I want to block only part of the pool e.g. 175.159.64.0 - 175.159.127.255 ?

175.159.64.0 - 175.159.127.255

:left_arrow_curving_right: 175.159.64.0/18

Can you explain the methodology, why?

You can understand about the CIDR notation going to the link that falco mentioned. Some useful tips is that /32 is the same ip (1.2.3.4 = 1.2.3.4/32), /24 is the 256 possibilities of the last part (like 1.2.3.0 to 1.2.3.255), and every 8 that you subtract after the slash makes the range larger, so 0.0.0.0/0 is the range of all ips (ipv4).

The ip range you requested has all ranges of the last part, and some ranges from the 3rd part, so the notation would be something between 16 and 24. To make things easier you can use some utility for that, like the following:

https://www.ipaddressguide.com/cidr

(I’m not the site owner, just a quick search for “ip range to cidr util”, so use it at your own risk)

The result (range of 175.159.64.0 - 175.159.127.255) is: 175.159.64.0/18 (I’m not sure of the result actually, haven’t calculated myself, although, as expected, it’s between 16 and 24, but I think it’s correct because it’s the complete last part, plus 64 for the 3rd part, and 64=2^6, and then 24-6=18).