Forum Moderators: DixonJones
The other day logs showed strange activity from this IP range which led me to block em.
Could anyone with experience similar to this please advise me, much appreciated.
68-232-137-10.chvlva.adelphia.net - - [04/Mar/2006:15:25:03 -0500] "GET /errors/forbid.html HTTP/1.1" 302 238 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)"
68
How are you blocking this one? I don't know what you mean by "block list" -- how you're blocking either host names or IP addresses -- and immediate solutions depend on what's available to you, server-wise.
I'd use .htaccess with mod_rewrite (if it's available on your server) and [F] the specific host into oblivion. A 403-Forbidden will stop them in their tracks and stop your gushing bandwidth serving up (denying/redirecting to) a page+graphic over and over again.
The Apache Web Server Forum [webmasterworld.com] has tons of info about using mod_rewrite (which takes some head-banging but works like a charm once you get it working:) Jim Morgan knows his stuff and his posts are well worth reading/heeding.
There are other .htaccess-based solutions, too. Again, what you can do depends on your server and your access to its various capabilities.
Last but not least, in those instances when some server is maniacally out of control, I'll ask my immediate upstream provider to place a filter (read: nuke) them in their firewall(s). Plus I'll formally complain to the other host, usually via Web, sometimes via e-mail (include a section of your log file), or even phone.
Good luck!
ErrorDocument 400 www.widgets.com/errors/badrequest.html
ErrorDocument 401 www.widgets.com/errors/authreqd.html
ErrorDocument 403 www.widgets.com/errors/forbid.html
ErrorDocument 500 www.widgets.com/errors/serverr.html
CaseInsensitive On
<Files .htaccess>
deny from all
</Files>
order allow,deny
deny from somerottenbuggers.com
allow from all
I would like to use mod rewrite but changes have to be made to .htconfig It was actually Jim Morgan that advised me of that last year. Unforunately thats something the host says it cant do, even though i am on a VMS so i used the deny command as it was my only option other than changing servers.
I removed them from the deny list, and am now looking for a host and one of the requirements is that .htconf can be edited to allow for the mod rewrite.
Are you actually returning a 403 access denied status code? The log entry you've posted shows the status code as 302 (temporary redirect), which isn't even one of the error codes.
You can't expect bots to treat things as access denied if that isn't what they're being told.
Yikes! I thought that was automatic, you mean i have to have a special code in the page i send them too?
How emberassing... (silly grin)
you mean i have to have a special code in the page i send them too?
Your high number are most likely the result of a loop since you are denying access but serving your own forbid.html to them at the same time. Try this if you can:
SetEnvIf Remote_Host somerottenbuggers\.com ban
SetEnvIf Request_URI ^errors/forbid\.html$ allowit
<Files *>
Order Deny,Allow
Deny from env=ban
Allow from env=allowit
</Files>
Thanks for the code, i've been busy with other things(drywalling,jackhammers,carpentry)to pay the rent and hav'nt had time to try it.
I hope this works with mod rewrite off because my host will not set it to allow, kinda bogus cause they are one of the largest here in Canada.
Are you actually returning a 403 access denied status code? The log entry you've posted shows the status code as 302 (temporary redirect), which isn't even one of the error codes.
And here's the reason -- one of the most common errors in Apache configuration:
ErrorDocument 400 www.widgets.com/errors/badrequest.html
ErrorDocument 401 www.widgets.com/errors/authreqd.html
ErrorDocument 403 www.widgets.com/errors/forbid.html
ErrorDocument 500 www.widgets.com/errors/serverr.html
ErrorDocument 400 /errors/badrequest.html
ErrorDocument 401 /errors/authreqd.html
ErrorDocument 403 /errors/forbid.html
ErrorDocument 500 /errors/serverr.html
There's another important warning about Internet Explorer's behaviour in that documentation as well.
Jim