URGENT: deny,allow question (EASY)

This is a discussion on URGENT: deny,allow question (EASY) within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi I need to allow people at 10.1.*.* and 10.2.*.* to access a certain location, but I need ...


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-10-2003
Guy Dallaire
 
Posts: n/a
Default URGENT: deny,allow question (EASY)

Hi

I need to allow people at 10.1.*.* and 10.2.*.* to access a certain
location, but I need to prevent people at 10.1.65.* to do so.

Will this work:

<Location "/mylocation/*">
Order deny,allow
deny from 10.1.65/255.255.255.0
allow from 10.1 10.2
</Location>

I mean, even though 10.1.* includes 10.1.65, will the DENY actually
short-circuit the evaluation and prevent the allo directive from being
processed ?

If not, how can I achieve this ?



  #2 (permalink)  
Old 11-10-2003
Robi
 
Posts: n/a
Default Re: URGENT: deny,allow question (EASY)

Guy Dallaire wrote:
> Hi
>
> I need to allow people at 10.1.*.* and 10.2.*.* to access a certain
> location, but I need to prevent people at 10.1.65.* to do so.
>
> Will this work:
>
> <Location "/mylocation/*">
> Order deny,allow
> deny from 10.1.65/255.255.255.0
> allow from 10.1 10.2
> </Location>



you should set it up the other way around (I prefer CIDR notation):

Order allow,deny
Allow from 10.1.0.0/16
Allow from 10.2.0.0/16
Deny from 10.1.65.0/24

>
> I mean, even though 10.1.* includes 10.1.65, will the DENY actually
> short-circuit the evaluation and prevent the allo directive from being
> processed ?


your way, although it first denies access, it allows it again.

see:
http://httpd.apache.org/docs-2.0/mod...ess.html#order

>
> If not, how can I achieve this ?


HTH


--
Robi
  #3 (permalink)  
Old 11-10-2003
Guy Dallaire
 
Posts: n/a
Default Re: URGENT: deny,allow question (EASY)

thanks

"Robi" <me@privacy.net> a écrit dans le message de
news:boolg6$1g9o7t$1@ID-211961.news.uni-berlin.de...
> Guy Dallaire wrote:
> > Hi
> >
> > I need to allow people at 10.1.*.* and 10.2.*.* to access a certain
> > location, but I need to prevent people at 10.1.65.* to do so.
> >
> > Will this work:
> >
> > <Location "/mylocation/*">
> > Order deny,allow
> > deny from 10.1.65/255.255.255.0
> > allow from 10.1 10.2
> > </Location>

>
>
> you should set it up the other way around (I prefer CIDR notation):
>
> Order allow,deny
> Allow from 10.1.0.0/16
> Allow from 10.2.0.0/16
> Deny from 10.1.65.0/24
>
> >
> > I mean, even though 10.1.* includes 10.1.65, will the DENY actually
> > short-circuit the evaluation and prevent the allo directive from being
> > processed ?

>
> your way, although it first denies access, it allows it again.
>
> see:
> http://httpd.apache.org/docs-2.0/mod...ess.html#order
>
> >
> > If not, how can I achieve this ?

>
> HTH
>
>
> --
> Robi



 


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

vB 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 11:36 AM.


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