Bok McDonagh
Bok McDonagh

Reputation: 1447

nginx configuration: How to allow a range of addresses?

How do I allow a range of IP addresses in nginx.conf? For example I want to do something like this:

server {
    allow x.y.z.192 - x.y.z.255;
    deny all;

    <snip>
}

Upvotes: 1

Views: 2127

Answers (1)

Mohammad AbuShady
Mohammad AbuShady

Reputation: 42849

The point is that you need to use CIDR format, there's a lot of online converters

try this

allow x.y.z.192/26

Upvotes: 3

Related Questions