Forum Moderators: phranque

Message Too Old, No Replies

Multiple IP's?

How do i ban multiple IP's?

         

dinkoman

6:48 pm on Jun 6, 2007 (gmt 0)

10+ Year Member



I have a website in which i want to ban certain IP's from because of spamming. The site is running through fasthosts on Windows. I have made a htaccess file and it shows up in the FTP as what i put in, however i want to ban a network of IP's from 89.***.208.xyz The trouble being that i want to ban anything from that address but i must put the exact IP that i am trying to ban, such as 89.***.208.12 But i want to ban every computer there, not just one specific machine or IP. Also they are variable IP's on the end were one day it may be as the above the next it may be 89.***.208.11

So i want to know if i can ban the range of those in .htaccess, or if there is any other method, i was thinking of wildcarding so it could ban the whole set, anything with the number sequence 89.***.208.xyz anyway. Can someone tell me how to ban all these IP's without putting every number on the end of them?

Any help appreciated

[edited by: jdMorgan at 7:46 pm (utc) on June 6, 2007]
[edit reason] Obscured IP addresses -- Please see charter. [/edit]

jdMorgan

7:44 pm on Jun 6, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



See Apache mod_access.

There are three ways to ban ranges: By partial IP address, by Netmask, and by CIDR. These are explained in the Apache mod_access documentation.

Jim

dinkoman

7:58 pm on Jun 6, 2007 (gmt 0)

10+ Year Member



sorry for being such as n00b but were is that document

jdMorgan

8:07 pm on Jun 6, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can find it here [google.com], although you may want to add your server version, 1.3, 2.0, 2.1, or 2.2.

Jim