Forum Moderators: phranque

Message Too Old, No Replies

Order Allow,Deny

         

rfontaine

7:14 pm on Oct 5, 2005 (gmt 0)

10+ Year Member



Hi,

I have been having a pesky bot visit my site too often. It uses alot of different IP's.

The first 3-parts of it's IP are always the same, but the last number is the one that varies. I would like to ban all of the ip's that have the first 3-parts the same, using an .htaccess file, just to make sure I get this guy. Would this be the way to do it, or is the "255" part incorrect?

Order Allow,Deny
Allow from all
Deny from abc.def.ghi.1/255

or maybe it would be:
Order Allow,Deny
Allow from all
Deny from abc.def.ghi.

jdMorgan

7:55 pm on Oct 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can use any one of three methods to do this. See the details under mod_access Allow [httpd.apache.org] directive; The last three methods -- partial IP address, network/netmask pair, and network/nnn CIDR specification -- apply to your case.

Jim

rfontaine

7:57 pm on Oct 5, 2005 (gmt 0)

10+ Year Member



So

Order Allow,Deny
Allow from all
Deny from 111.222.333.

Would block every ip from
from 111.222.333.1
to 111.222.333.255

right?