Ben_DJ
1
hi,
this works fine,
if ($remote_addr = 1.2.3.4) {
…
}
i’d like to match, rather than on a single IP, to a network range. in
effect,
if ($remote_addr = 1.2.3.0/24) {
…
}
but, afaict, that doesn’t work.
is there a way to conditionally match $remote_addr against a network
range?
thanks,
bendj
Ben_DJ
2
Today Jun 17, 2010 at 12:17 Ben DJ wrote:
i’d like to match, rather than on a single IP, to a network range. in effect,
if ($remote_addr = 1.2.3.0/24) {
…
}
but, afaict, that doesn’t work.
GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com · GitHub
geo $mysubnet {
default 0;
1.2.3.0/24 1;
}
…
if ($mysubnet) {
…
}
–
WNGS-RIPE
Ben_DJ
3