Is there something special needed to match subnets in nginx when using map
? I have the below configuration in the http {}
block. The client IP is 10.0.3.1. If i remove the 10.0.3.1
entry it always returns deny instead of matching the 10.0.3.0/24 subnet. Is there a nginx module required that i'm missing or something ?
I'm basing this config on some blog articles but can't find any official documentation to say this notation is supported.
map $remote_addr $allowed {
10.0.3.1 allow;
10.0.2.0/24 allow;
10.0.3.0/24 allow;
default deny;
}