Forum Moderators: open

Message Too Old, No Replies

ASP bot block

Any ASP solutions?

         

Hman

5:52 am on Mar 26, 2002 (gmt 0)




Hello all,

I've been lurking for some time and have learned quite a lot, thanks. Are there any ASP users that can clue me in on blocking bots and or IP addresses? Since some bots can be very abusive and suck up bandwidth, I had a wild idea. Is there any way to limit the bytes transfered to any one IP? Some number low enough to stifle a bad bot or enough to prevent a server crash?

Key_Master

5:58 am on Mar 26, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There's a crude ASP solution at the post below. You could tinker with it and customize to your liking.

[webmasterworld.com...]

click watcher

8:36 am on Mar 26, 2002 (gmt 0)



not much help, but

i recently asked my hosts about this (win2k) and they said they could block any ip addresses i just needed to send them my list, i assumed it was a setting on iis that could be adjusted.

william_dw

11:49 pm on Mar 30, 2002 (gmt 0)

10+ Year Member



Hi there,
If spiders respected cookies this would be so easy, just a quick cookie each time updated with currentVal + thisPageSize , but alas spiders dont play be the rules, esp. the nasty ones.

If you have the resources for it,
an application level solution would work,
it cant be session based because that relies on cookies.

You'd need to be careful with your application.lock and .unlock's of course.

If you cant find/havent found anything else and really need it post back here and i'll code up something based upon bytes sent using application variables & post it to the board.

HTH,
Dw

william_dw

11:49 pm on Mar 30, 2002 (gmt 0)

10+ Year Member



Ignore this post,
forgot to enable email notifications <grin>

Hman

6:12 am on Mar 31, 2002 (gmt 0)



Thanks for the offer William. We've managed to create an IP blocker. The site is quite large and database driven and is capable of generating thousands of pages. What concerns me the most is too many spiders hogging bandwidth or a bad one really slowing down the server or worst case crashing the server. Due to our content we are thinking about turning off places like China completely. Anyone know what Block to turn off or have any other places in mind? Our content is geared mostly for U.S. users and parts of Europe. Our ASP code does use "ASP?" in query strings but not everywhere and we have over a hundred static pages in place. Any help would be appreciated.

Thanks,
Hman - The Horseman

william_dw

3:02 am on Apr 4, 2002 (gmt 0)

10+ Year Member



An easy way to block off entire areas like that would be by browser language,
then you can even get people dialling in via AOL from wherever.

I should point out that the internet should bring people closer, not block off areas of the world, but for now at least most servers in china act as open mail relays, so I guess it wont hurt to redirect users to somewhere else.

Here's the code you should need:
<%
'Put this in the head of a document, as early as possible...
if lcase(left(request.serverVariables("HTTP_ACCEPT_LANGUAGE"), 2)) <> "en" then
'Visitor is from somewhere that doesnt use english, redirect...
response.redirect "/errors/common/invalidLanguage.asp?"
end if

%>

HTH,
Dw

Hman

5:54 am on Apr 5, 2002 (gmt 0)



Thanks again William, I hadn't thought of that one. I wouldn't mind keeping it open to all, but as you know there just isn't an ideal internet anymore if there ever was one. If it wouldn't use up server resources so much in having to track IPs I still wish there was a way to limit bytes transfered to any one IP address.

Hman - The Horseman

(Admin - Whats wrong with your server? As I'm posting this the site is so slow as to be unusable)