December 28, 2019 06:42AM
Hi!
I want to mark same subnets to as $white_list. I currently use:

# urdas web
location / {
if ($remote_addr ~ "(10.10.1.128)|(10.20.1.53)|(10.30.14.56)") {
set $white_list a712ba9579080e61cd89955a2cb837bf;
}
proxy_pass http://10.10.1.53:30081;
proxy_set_header WhiteList $white_list;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}

It work well. But works only by one IP address. How to mark as subnets?
Subject Author Posted

if ($remote_addr ~ and set $white_list for subnets?

antikurjers December 28, 2019 06:42AM

Re: if ($remote_addr ~ and set $white_list for subnets?

antikurjers December 28, 2019 07:25AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 71
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready