Trackback Spam on the Rise
Anyone else notice a rise in trackback spam recently or is it just me they feel like picking on? The last few days I have been getting upwards of 50 trackback spams. Thanks to Akismet I have not seen any of them go through, but I decided that I was tired of deleting it and letting the spammers get access to my server resources. A quick look in my logs showed that the spam was not coming from the same IP so banning the IP or IP range would be pretty much useless.
Here are some entries from my log file:
Host: 216.104.34.250 /2007/03/text-link-ads.html/trackback Http Code: 200 Date: Dec 18 20:24:03 Http Version: HTTP/1.0 Size in Bytes: 78 Referer: - Agent: TrackBack/1.6
Host: 91.186.21.51 /2007/02/blogger-label-list-for-ftp-published.html/trackback Http Code: 200 Date: Dec 18 20:22:38 Http Version: HTTP/1.0 Size in Bytes: 78 Referer: - Agent: TrackBack/1.6
Host: 66.90.104.22 /2007/02/has-digg-jumped-the-shark.html/trackback Http Code: 200 Date: Dec 18 20:20:28 Http Version: HTTP/1.0 Size in Bytes: 615 Referer: - Agent: TrackBack/1.6
Notice anything in common? The User Agent strings are all the same: Agent: TrackBack/1.6.
A quick Yahoo search and I turned up this post Spiders and Bots .htaccess Ban List, which looked like just what I needed. There are tons of bad bots and user agents out there, and this list is only a small number of them I am sure. I really only want to block the Trackback user agent and the libwww-perl user agent since I have been getting several hacking attempts from a libwww-perl user agent.
There are several ways I could have done this but I thought I would try adding this first and see how it goes.
#block bad bots including trackback bot SetEnvIfNoCase User-Agent "^libwww-perl" bad_bot SetEnvIfNoCase User-Agent "^TrackBack" bad_bot <Limit GET POST> order allow,deny allow from all deny from env=bad_bot </Limit>
I may have to edit the Trackback bot line since I did not include the version number, but I will leave it like that for a day and see what shows up in my log files. I will update this post if/when I do edit the Trackback bot line.
Thanks to Brontobytes Blog for the .htaccess code. It saved me lots of time.
Hope this helps someone that is having problems with automated trackback spam.