Trying to Block a string of IPs. Please help a Noob!

dentedk

Registered
Sep 17, 2004
2
0
151
I am trying to block an entire string of IPs. Here is why......I have a guy coming to my forum and raising all sorts of hell. I have banned him but he has a dynamic IP so he just logs out and back in and makes a new profile. He is also taking pictures off my site and photoshopping them (ones of me I dont care about but he made some CRUDE ones of my wife and kids). I do not want to hot link protect because we post pix in different forums and I have a page set up where friends can put their pix on to share as well. anyway....all of his IPs resolve to ameritech.net and I have banned that domain but the blocked IP is not the same as his and he can still get in.

SO I guess my question would be how the hell do I block a butt load of IPs (the entire string) so I can get rid of this a$$hole?

Thank you in advance!
 

SarcNBit

Well-Known Member
Oct 14, 2003
1,001
3
168
It helps if you say upfront if you are a cPanel host or end-user. I am assuming you are a cPanel end-user. :)

Create an file named .htaccess and place it in your public_html folder. In the .htaccess file place the following:

order deny,allow
deny from 1.2.3.4

Where 1.2.3.4 is the IP address you wish to ban. If you want to ban a range or multiple ranges you do not have to enter all 4 values. Here is another example:

order deny,allow
deny from 1.2.3
deny from 1.2.4
deny from 1.2.6
deny from 2.3