S
S
Stepan2012-05-09 20:16:45
Nginx
Stepan, 2012-05-09 20:16:45

How to make ip range to CIDR?

You need to set up forwarding in Nginx. The documentation describes that the ip format must be either a range or in CIDR. If I set the range for example 192.0.2.1-192.0.2.254 then nothing happens at all.
In CIDR format, I prescribe this:
192.0.2.1/32 192.0.2.2/31 192.0.2.4/30 192.0.2.8/29 192.0.2.16/28 192.0.2.32/27 192.0.2.64/26 192.0.2.128/26
192.0.0 27 192.0.2.224/28 192.0.2.240/29 192.0.2.248/30 192.0.2.252/31 192.0.2.254/32 But for some reason it does not affect the entire range. Maybe I'm setting CIDR incorrectly? I use the site ip2cidr.com/ for generation.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Burov, 2012-05-09
@L3n1n

This is pretty much the same as 127.0.0.0/24 (/24 includes .0 and .255)
PS: There are specially reserved IPs for examples.

E
ertaquo, 2012-05-09
@ertaquo

Maybe it's because the range 127.0.0.0/8 is reserved for loopback?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question