cancel
Showing results for 
Search instead for 
Did you mean: 

Blocking visitors from web space

N/A

Blocking visitors from web space

I had a big hit to my web site yesterday and got a warning from PN about exceding my traffic allowance. It turns out the hit was from one IP, in a Pipex dynamic adsl pool.

So, this morning, I looked into htaccess directives for blocking visitors and came up with this:
order allow,deny

deny from 81.86.
allow from all


The mask isn't ideal, as a lookup of the IP says it's in a block from 81.86.128.0 - 81.86.191.255. However, reading the forum/usertools tutorial on htaccess, it mentions: "Note: This features does not work on PlusNet servers."!!

So, can anyone confirm this and/or suggest a way round my problem?
Also, does anyone know how the warning system works?

Thanks in advance!
5 REPLIES
N/A

Blocking visitors from web space

Hiya Keith.

The blocking does not work on th CGI server, however, it works perfectly fine on the homepages server.

I am looking into some detail to extend the tutorial to the CGI server, using mod_rewrite instead, I need to brush up on my regexp first.
N/A

Blocking visitors from web space

Thanks Phil, that's a relief.

Hopefull the work I've already done will cover me. I just need to be more specific with the deny range now.
N/A

Blocking visitors from web space

To match the IP range 81.86.128.0 - 81.86.191.255

You can use

Mask match
Deny from 81.86.128.1/255.255.192.0

Or

CIDR match
Deny from 81.86.128.1/18
N/A

Blocking visitors from web space

Whoah, I'm impressed!
Seen before but never understood "CIDR", but I've just looked it up and it's to do with numbers of bits! You learn something new every day. Cheers Phil. That's another pint I owe you.
N/A

Blocking visitors from web space

I've tried but I can't get .htaccess to work.

the file contains:
order deny,allow

deny from 172.16.140
deny from 80.229.228.49
deny from 172.16.57.3
deny from 172.16.57.4
deny from 172.16.57.6
deny from 172.16.57.7
allow from all

I have a re-direct set up from my homepage pointing to my cgi space, and have tried putting the .htaccess file in a subfolder on the homepage server and browse to that successfully.

I'm trying to ban my own IP from the subdirectory, and IP's within a private domain - though not all - are either of these things possible?Huh