Welcome! Log In Create A New Profile

Advanced

Whitelisting IP CIDR for a subdomain

Posted by bgodby1978 
Whitelisting IP CIDR for a subdomain
March 26, 2019 05:14PM
Brand new to the forum and to NGINX so please be gentle....

Using NGINX Plus to be a load balancer for a .NET web application running on windows servers. We use subdomains to separate environments. We would like to implement IP whitelisting based on the domain. So:

environment1.example.com
environment2.example.com
environment3.example.com

192.168.1.1/24 should be able to access all environments <- Default config allows this
192.168.2.1/24 should be able to access environment 2 only <- This is the scenario we can't seem to solve (though we believe we can write a custom LUA script to do it, we would like to avoid that)
192.168.3.1/24 should not be able to access any environments <- Figured out several ways to do this, easiest is to use DENY directive in server block.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 323
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