Welcome to WebmasterWorld Guest from 54.163.52.98

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Closing connection on certain hits

Is there a module to do this?

     

abates

10:52 pm on Sep 19, 2006 (gmt 0)

10+ Year Member



My weblog is constantly under a stream of spam attacks. Fortunately the attacks rarely hit a working script, because over the years I've renamed scripts and put commented-out forms on my pages which throw their spamming scripts off. However a number of spammers keep hitting these absentee scripts no matter whether they get a 404, 403 or other response.

So rather than bother with serving them a response, I'd like to close the connection without sending any headers or data in order to minimise the server impact and possibly give their scripts a more direct hint. Due to the nature of the hits, I can only detect them by the URL they hit.

Are there any Apache modules which could do this? I'm using Apache 1.3.37.

zomega42

3:28 am on Sep 21, 2006 (gmt 0)

10+ Year Member



I'm not sure about this as I've never tried it, but maybe a "Connection: close" header would do the trick.

abates

12:24 am on Sep 22, 2006 (gmt 0)

10+ Year Member



Thanks zomega. I ended up with a Perl script which did this:
print "Status: \nConnection: Close\n\n";

That closes the connection with a null status (I tried without the null status and Apache filled in a 200 status for me).

It's not a perfect solution since Apache has to process the perl script, but hopefully it'll give the spammers the mesage.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month