Welcome! Log In Create A New Profile

Advanced

Re: Access restriction only for people outside LAN

Tomasz Pajor
September 28, 2009 06:04AM
You could try something like this.

geo $need_auth {
default 1;
192.168.1.0/24 0;
}

server {
...
location / {
if ($need_auth) {
<auth>
}
}
}
> Hi all,
>
> I have a service which should be protected using Basic Authentication,
> but this authentication should be enabled only for people who connect
> to my service from "the outside of my LAN". Other people (inside LAN)
> should not have any authentication.
>
> Is this possible? How to do that? I couldn't figure out how to use
> combination of allow/deny with basic authentication for certain
> location (maybe this is wrong way...).
>
> Cheers,
> Kamil
>
>
Subject Author Posted

Access restriction only for people outside LAN

Kamil Gorlo September 28, 2009 05:18AM

Re: Access restriction only for people outside LAN

Cedric Jeanneret September 28, 2009 05:52AM

Re: Access restriction only for people outside LAN

Igor Sysoev September 28, 2009 06:12AM

Re: Access restriction only for people outside LAN

Cedric Jeanneret September 28, 2009 06:28AM

Re: Access restriction only for people outside LAN

Tomasz Pajor September 28, 2009 06:04AM

Re: Access restriction only for people outside LAN

Igor Sysoev September 28, 2009 06:12AM

Re: Access restriction only for people outside LAN

Tomasz Pajor September 28, 2009 06:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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