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