requiring auth from all except local network?

This is a discussion on requiring auth from all except local network? within the Apache Web Server forums, part of the Web Server and Related Forums category; At presenet I have my apache2 set up to require user authentication and that seems to work fine. I want ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-20-2006
Troy Piggins
 
Posts: n/a
Default requiring auth from all except local network?

At presenet I have my apache2 set up to require user
authentication and that seems to work fine.

I want to change the setup so that auth is not required if
accessing from my internal network 192.168.0., or in fact any
network I want, but is for all other networks.

Is that possible and how?

I've tried playing with the allow/deny settings and can control
access to the server from different networks with

deny from all
allow from 192.168.0.0/16 accepteddomain.tld

and so on, but those networks still get the auth dialog box.
I want to change the deny from all so that any network can see
the auth dialog, but allowed networks don't need authentication.

--
Troy Piggins ,-O (o- O
O ) //\ O
`-O V_/_ OOO
RLU#415538
  #2 (permalink)  
Old 11-20-2006
shimmyshack
 
Posts: n/a
Default Re: requiring auth from all except local network?


> I've tried playing with the allow/deny settings and can control
> access to the server from different networks with
>
> deny from all
> allow from 192.168.0.0/16 accepteddomain.tld
>
> and so on, but those networks still get the auth dialog box.
> I want to change the deny from all so that any network can see
> the auth dialog, but allowed networks don't need authentication.
>
> --


youve got the right idea, now you just have to tell apache to satisfy
any, so that either you authenticate, OR ban by IP. that way you can
specify the rules for allowing by IP, and if they match the auth isnt
needed, whereas if the IP doesnt match the allowed list, the auth is
required.

Satisy Any

  #3 (permalink)  
Old 11-20-2006
Jim Hayter
 
Posts: n/a
Default Re: requiring auth from all except local network?

Troy Piggins wrote:

>
> I want to change the setup so that auth is not required if
> accessing from my internal network 192.168.0., or in fact any
> network I want, but is for all other networks.



read up on the "satisfy any" directive.

Jim
  #4 (permalink)  
Old 11-20-2006
Troy Piggins
 
Posts: n/a
Default Re: requiring auth from all except local network?

* Jim Hayter wrote:
> Troy Piggins wrote:
>
>> I want to change the setup so that auth is not required if
>> accessing from my internal network 192.168.0., or in fact any
>> network I want, but is for all other networks.

>
> read up on the "satisfy any" directive.


Yep - that did the trick:

....
Order deny,allow
deny from all
allow from 127.0.0 192.168.0
Satisfy Any
AuthType ...

Thanks Jim.

--
Troy Piggins ,-O (o- O
O ) //\ O
`-O V_/_ OOO
RLU#415538
  #5 (permalink)  
Old 11-20-2006
Troy Piggins
 
Posts: n/a
Default Re: requiring auth from all except local network?

* shimmyshack wrote:
>
>> I've tried playing with the allow/deny settings and can control
>> access to the server from different networks with
>>
>> deny from all
>> allow from 192.168.0.0/16 accepteddomain.tld
>>
>> and so on, but those networks still get the auth dialog box.
>> I want to change the deny from all so that any network can see
>> the auth dialog, but allowed networks don't need authentication.

>
> youve got the right idea, now you just have to tell apache to satisfy
> any, so that either you authenticate, OR ban by IP. that way you can
> specify the rules for allowing by IP, and if they match the auth isnt
> needed, whereas if the IP doesnt match the allowed list, the auth is
> required.
>
> Satisy Any


Thanks mate - see my other followup - it worked.

--
Troy Piggins ,-O (o- O
O ) //\ O
`-O V_/_ OOO
RLU#415538
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:23 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0