Welcome! Log In Create A New Profile

Advanced

Re: Access restriction only for people outside LAN

September 28, 2009 06:12AM
On Mon, Sep 28, 2009 at 11:58:21AM +0200, Tomasz Pajor wrote:

> You could try something like this.
>
> geo $need_auth {
> default 1;
> 192.168.1.0/24 0;
> }
>
> server {
> ...
> location / {
> if ($need_auth) {
> <auth>
> }
> }
> }

"satisfy any" is better;

> > 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
> >
> >
>

--
Igor Sysoev
http://sysoev.ru/en/
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: 210
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