Hi all, my first post on this forum so please bare with me here.
I host my own site from my computer at home and am running Apache 2.2
My site URL is a very public one in nature as I belong to another forum and have it listed in my sig so users can get to the site easily.
Unfortunetly this is also a very public location for those pesky robots that attack guestooks relentlessly. I've noticed that a lot of the robots have IP addresses that don't resolve to a server name and for those I have a portion of my guestbook CGI script that will automatically ban them by adding all unresolved IP addresses to a .htaccess file located in the guestbook subdirectory using the form of:
Deny from 192.168.0.2 (as an example)
and this seems to work pretty well for those unresolved addresses. The only down sides I see to using this method is that the possibility of an actual user getting banned and that the IP addresses keep stacking up in the .htaccess file which is starting to get somewhat large. Using this method, only unresolved IP addresses get banned for the guestbook. This method does not ban any IP address from the rest of the site, just from the guestbook and this is by design.
On the other hand, I get the IP's that DO resolve to something like:
p1174-ipbf407sapodori.hokkaido.ocn.ne.jp
d-211-14-250-026.d-cable.katch.ne.jp
usr049.pial012-02.wpb.im.wakwak.ne.jp
The only common thing about these IP addresses is that these in particular all are comming from Japan (.jp)
I have tried using rewrite to ban these robots, but I'm either just not "getting it" or what I want to do may not be possible. I've been trying to write some conditions and rules to filter these types of addresses with no success at all. Looking at the addresses, they all end with .jp
Is there a way using rewrite to ban all addresses that end with .jp rather than banning each address individually? Or is there a different or better way to do it?
TIA for any help and Happy Thanksgiving!
Steve-