Welcome! Log In Create A New Profile

Advanced

hostname support in geo (ngx_http_geo_module) variable maps?

PGNet Dev
July 25, 2022 10:24AM
i'm running nginx/1.23.1

i use 'geo'-based (ngx_http_geo_module) permissions to restrict access to some sites
e.g., for explicit static IPs

geo $RESTRICT_ACCESS {
default 0;
127.0.0.1/32 1;
2601:...:abcd 1;
}

server {
...
if ($RESTRICT_ACCESS = 0) { return 403;}

it works as intended.

i'd like to add access for a couple of hosts with dynamic IPs.
the IPs *are* tracked, and updated to DNS.

e.g., both A & AAAA records exist, and are automatically updated on change, at

mydynamicIP.example.com

so that, in effect,

geo $RESTRICT_ACCESS {
default 0;
127.0.0.1/32 1;
2601:...:abcd 1;
<IPv4 addr for mydynamicIP.example.com> 1;
<IPv6 addr for mydynamicIP.example.com> 1;
}

at wiki, there is mention of

"ngx_http_rdns_module"
https://www.nginx.com/resources/wiki/modules/rdns/

which points to

https://github.com/flant/nginx-http-rdns

but, there

"Disclaimer (February, 2022)
This module hasn't been maintained by its original developers for years already."

is there a recommended/current method for using *hostnames* in geo? ideally, without lua.
_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-leave@nginx.org
Subject Author Posted

hostname support in geo (ngx_http_geo_module) variable maps?

PGNet Dev July 25, 2022 10:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 168
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready