# Blacklist ip blocks - ip range?

**URL:** https://meta.discourse.org/t/blacklist-ip-blocks-ip-range/175376
**Category:** Support
**Created:** [January 7, 2021, 12:44pm UTC](https://meta.discourse.org/t/blacklist-ip-blocks-ip-range/175376 "2021-01-07T12:44:36Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![slivo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/slivo/32/186825_2.png) [@slivo](https://meta.discourse.org/u/slivo)
#### Post date: [January 7, 2021, 12:44pm UTC](https://meta.discourse.org/t/blacklist-ip-blocks-ip-range/175376/1 "2021-01-07T12:44:36Z")

</div>

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

---

<div class="post-metadata">

### Author: ![osioke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osioke/32/238946_2.png) [@osioke](https://meta.discourse.org/u/osioke)
#### Post date: [January 7, 2021, 12:59pm UTC](https://meta.discourse.org/t/blacklist-ip-blocks-ip-range/175376/2 "2021-01-07T12:59:44Z")

</div>

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`

---

<div class="post-metadata">

### Author: ![slivo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/slivo/32/186825_2.png) [@slivo](https://meta.discourse.org/u/slivo)
#### Post date: [January 7, 2021, 1:09pm UTC](https://meta.discourse.org/t/blacklist-ip-blocks-ip-range/175376/3 "2021-01-07T13:09:55Z")

</div>

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

---

<div class="post-metadata">

### Author: ![schleifer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schleifer/32/86416_2.png) [@schleifer](https://meta.discourse.org/u/schleifer)
#### Post date: [January 8, 2021, 8:59am UTC](https://meta.discourse.org/t/blacklist-ip-blocks-ip-range/175376/4 "2021-01-08T08:59:12Z")

</div>

> 175.159.64.0 - 175.159.127.255

↪ 175.159.64.0/18

---

<div class="post-metadata">

### Author: ![slivo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/slivo/32/186825_2.png) [@slivo](https://meta.discourse.org/u/slivo)
#### Post date: [January 20, 2021, 5:54pm UTC](https://meta.discourse.org/t/blacklist-ip-blocks-ip-range/175376/5 "2021-01-20T17:54:21Z")

</div>

Can you explain the methodology, why?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [January 20, 2021, 6:07pm UTC](https://meta.discourse.org/t/blacklist-ip-blocks-ip-range/175376/6 "2021-01-20T18:07:17Z")

</div>

> **[Classless Inter-Domain Routing | CIDR blocks](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_blocks)**
>
> CIDR is principally a bitwise, prefix-based standard for the representation of IP addresses and their routing properties. It facilitates routing by allowing blocks of addresses to be grouped into single routing table entries. These groups, commonly called CIDR blocks, share an initial sequence of bits in the binary representation of their IP addresses. IPv4 CIDR blocks are identified using a syntax similar to that of IPv4 addresses: a dotted-decimal address, followed by a slash, then a number fro...

---

<div class="post-metadata">

### Author: ![lucasbasquerotto](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lucasbasquerotto/32/133376_2.png) [@lucasbasquerotto](https://meta.discourse.org/u/lucasbasquerotto)
#### Post date: [January 20, 2021, 7:33pm UTC](https://meta.discourse.org/t/blacklist-ip-blocks-ip-range/175376/7 "2021-01-20T19:33:35Z")

</div>

> [@slivo](#):
>
> 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](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).
