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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
> 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 |
|
|||
|
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 |
|
|||
|
* 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 |
|
|||
|
* 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 |