Feet up!

Using Blackholes to Block Spammers

Nothing earth shattering here, but in a simple move to reduce the level of spam I've been getting on the wiki I've blocked a few sites with Apache's .htaccess file.

It's a "one strike and you're out" approach, any ip address that grabs forbidden files from my robots.txt file, or engages in comment, wiki, or referrer spam will probably be banned; it's my site, I can be as irrational as I like! My inertia and can't-be-arsed factor will affect the results here...

For those of you who also have high can't-be-arsed factors, here's a potted guide to using Apache's order, allow, and deny directives in an .htaccess file for this purpose.

For testing, try entering your ip address in the deny line; you should get 403 errors when you try to view your pages. To block further ip addresses just add further "deny from n.n.n.n" lines.

For added hilarity and possible unwanted consequences I've also added "deny from sbl-xbl.spamhaus.org" which should block all ip addresses in Spamhaus' sbl and xbl blacklists, I have no idea whether this really works yet; I'll have to track down all the 403's in my access logs and see if I can establish why they appeared. I'm not a huge fan of blacklists, but I've noticed that a number of my regular unwanted customers already appear in this blacklist so it appears to be worth trying out.

In summary, what I've done so far is very trivial to implement, but it requires some manual updating. I'm going to observe how well it works in practise for the next few weeks before automating the process further or abandoning the experiment. I'd like to think it proves to be effective. I don't think it'll be too resource intensive as despite it appearing that every hit will cause a dns lookup, in fact dns does a lot of caching and I suspect my local dns server will handle 90% or more of the requests.

[Wed, 05 Jan 2005 21:18] | [blogging] | #

About
Jim Hughes
Wiki (updates)

RSS for Feet up!
link to FOAF file
Full of LOAF
Flookie Blog Search


Web Sites
Ben Hammersley
Diego Doval
Erik Thauvin
Ewan Spence
Frank Koehntopp
Gustaf Erikson
I Didn't Vote For Boris
Matt Croydon
Mark Pilgrim
Martin Little
MobHappy
Phil Wilson
The Register
Rui Carmo
Russell Beattie
Taptu's mobile chemistry blog
Tarek Abu Esber
techype
Terje Sørgjerd
Tom Hume
TPN Rock

pyblosxom logo

Archives
2008-Jul
2008-Jun
2008-May
2008-Apr
2008-Mar
2008-Feb
2008-Jan
2007-Dec
2007-Nov
2007-Oct
2007-Sep
2007-Aug
2007-Jul
2007-Jun
2007-May
2007-Apr
2007-Mar
2007-Feb
2007-Jan
2006-Dec
2006-Nov
2006-Oct
2006-Sep
2006-Aug
2006-Jul
2006-Jun
2006-May
2006-Apr
2006-Mar
2006-Feb
2006-Jan
2005-Dec
2005-Nov
2005-Oct
2005-Sep
2005-Aug
2005-Jul
2005-Jun
2005-May
2005-Apr
2005-Mar
2005-Feb
2005-Jan
2004-Dec
2004-Nov
2004-Oct
2004-Sep
2004-Aug
2004-Jul
2004-Jun
2004-May
2004-Apr
2004-Mar
2004-Feb
2004-Jan
2003-Dec
2003-Nov
2003-Oct
2003-Sep
2003-Aug
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002

AAS Webring logo
Previous | Random | Next
Join | List | Home
Powered by RingSurf