Re: Banning block of IP addresses in .htaccess
Re: Banning block of IP addresses in .htaccess
am 01.11.2007 18:36:28 von Jim Hayter
Alfred Molon wrote:
> I'm familiar with the 'deny from' Apache directive:
>
>
> order allow,deny
> deny from all
>
>
> order allow,deny
> deny from a.b.c.d
>
> Now, how does the directive looks like if you want to ban the following
> range of addresses:
>
> a.b.c.0 - a.b.c.127 ?
deny from a.b.c.0/24
Above based on the fact that I use "allow from a.b.c.192/28" to allow
access from our office.
Jim
Re: Banning block of IP addresses in .htaccess
am 01.11.2007 18:51:43 von HansH
"Jim Hayter" schreef in bericht
news:13ik3kusqjef58@news.supernews.com...
>> Now, how does the directive looks like if you want to ban the following
>> range of addresses:
>>
>> a.b.c.0 - a.b.c.127 ?
>
> deny from a.b.c.0/24
>
I'ld rather say 'deny from a.b.c.0/25'
-or 'deny from a.b.c.0/255.255.255.128' -
http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#all ow
HansH
Re: Banning block of IP addresses in .htaccess
am 01.11.2007 19:52:42 von Jim Hayter
HansH wrote:
> "Jim Hayter" schreef in bericht
> news:13ik3kusqjef58@news.supernews.com...
>>> Now, how does the directive looks like if you want to ban the following
>>> range of addresses:
>>>
>>> a.b.c.0 - a.b.c.127 ?
>> deny from a.b.c.0/24
>>
> I'ld rather say 'deny from a.b.c.0/25'
> -or 'deny from a.b.c.0/255.255.255.128' -
> http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#all ow
>
> HansH
Good point (/25, not /24). I didn't read closely enough.
Jim
Banning block of IP addresses in .htaccess
am 02.11.2007 00:43:02 von Alfred Molon
I'm familiar with the 'deny from' Apache directive:
order allow,deny
deny from all
order allow,deny
deny from a.b.c.d
Now, how does the directive looks like if you want to ban the following
range of addresses:
a.b.c.0 - a.b.c.127 ?
--
Alfred Molon
http://www.molon.de - Photos of Asia, Africa and Europe