Artículo Siguiente: « Agregado anti-spam DNS trackback para B2evolution

08/22/07

09:13:38 pm , Categories: b2evolution , 551 words

DNS trackback anti-spam plugin for B2evolution

Update (09/03/2007): A new version of this plugin has been released. The links below to the ZIP file has been updated accordingly. Issue believed to have been solved: trackbacks coming from wordpress.com hosted sites. Read the announcement and upgrade.

Esta información está disponible también en español.

B2evolution is a very nice piece of software and I definitely love it. It has grown with me and I have grown as a blogger with it.

That being said, I decided to test my knowledge, both of B2evolution and of PHP writing a small plugin to repel trackback spam attacks. It's called DNS Antispam trackback. You can download following the link:

DNS Trackback anti-spam plugin for B2evolution

Follow up:

What's the problem?

The problem is the very annoying trackback spam, which if unchecked threatens to disable that very useful tool called trackback, which allows us bloggers to communicate among ourselves.

In the course of notifying the central B2evolution anti-spam blacklist I noted that every trackback spam I received had a common property: the IP from which the trackback was sent was different from the IP address of the website the tracback refers to. I explained the thing more or less in detail in the B2evolution support forum back in January, when I wanted somebody else to develop my idea.

It turned out that B2evolution's plugin system is fairly easy to use, so I developed the thing myself.

What it does

The plugin check for every incoming trackback and compares the IP address of the originating host with the IP address of the referred website by doing a DNS lookup. If these two addresses are different, the trackback is flagged as spam and automatically rejected. As simple as that.

There are several situations in which the originating host may be different from the referred website and the trackback still be legitimate:

  1. Users of Haloscan service would fall into this category.
  2. Users of Wordpress.com or similar hosted blog services, where the trackback sender could be on a different machine to the one serving normal blog traffic. I have checked several wordpress.com website, and they have two IP addresses. I guess they use some sort of load balancing system.

The version of the plugin I'm publishing here is 0.2 and it takes into account case number 2 above. So it will check every IP address returned by gethostbynamel(), instead of only the first returned by gethostbyname().

How to use it

  1. Download the ZIP file.
  2. Upload it to your "plugins" directory under your B2evolution root installation.
  3. Unzip the file into that directory.
  4. Install the plugin from the Backoffice (/blogs/admin.php?ctrl=plugins)

That's it. You can forget about trackback plugin. I have it installed for my B2evolution 1.10.2 since July 10 or something like that, and so far I have received only one trackback spam, which had the correct IP addresses. This in comparison to the 5 to 10 I used to receive before installing the plugin.

That being said, I don't know what would be the performance penalty incurred by the extra DNS lookups for every incoming trackback. If your server is burned as a consequence of installing this plugin, you and only you are resposible for it. YMMV.

Thanks to Balupton for his input and help in testing.

Have fun!

Trackback address for this post

Trackback URL (right click and copy shortcut/link location)

6 comments, 2 trackbacks

Trackback from: Crónicas Linuxeras [Visitor]
Agregado anti-spam DNS trackback para B2evolution
B2evolution es una herramienta para bitácoras excelente y definitivamente me encanta usarlo. El software ha ido creciendo conmigo, de la misma manera que yo he ido creciendo como bitacorero o bloguero con el software.

Dicho esto, hace unas semanas d...
08/24/07 @ 07:17
Comment from: Walter Cruz [Visitor] Email · http://b2evolution.waltercruz.com
Bacana! Só precisamos ver aquela questão dos trackbacks de wordpress.com
08/28/07 @ 14:01
Trackback from: Crónicas Linuxeras [Visitor]
Antispam plugin for B2evolution versión 0.3
I have released the version 0.3 of the DNS Trackback antispam plugin for b2evolution. You can download this zip file and upgrade the previous version, just by overwriting the old files in your plugins/ directory.

This new version of the plugin addr...
09/03/07 @ 07:27
Comment from: Yours Truly [Visitor] Email · http://blog.thedarksighed.com/projectblog
This is a great plugin. I've been using it for a while now on my blog and just upgraded to the 0.3 version. Thanks for making it available.
11/18/07 @ 17:55
Comment from: CMPadron [Visitor] Email · http://padronel.net
***--
I ranked this just at the middle because there is something I don't understand. 99% of comments I receive in my blog don't have an URL within them because they come from people that don't have a web page or something requiring an URL.

I wonder what this plug-in would do in such a case.
04/07/08 @ 12:48
Comment from: CMPadron [Visitor] Email · http://padronel.net
Sorry, I made a mistake in previous comment. I think I should said:

«99% of comments I receive in my blog don't have a site IP address because they come from people that don't have a web site at all.

I wonder what this plug-in would do when comparing the originating host IP address with no site IP address».
04/07/08 @ 13:03
Comment from: Larry Nieves [Member] Email · http://liberal-venezolano.net/blog/
Nothing. This plugin does nothing on comments, only on trackbacks.
04/08/08 @ 12:05
Comment from: Busby [Visitor] · http://www.fortunowinner.com
I added the plugin but can't see at wp-admin/plugins.php

How do I get wordpress 2.6 to show trackbacks?

Is there a plugin to block trackbacks by IP
08/29/08 @ 12:05

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
PoorExcellent
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)
Diciembre 2008
Lun Mar Mié Jue Vie Sáb Dom
 << <   > >>
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

Aventuras y desventuras, experiencias y experimentos, anécdotas y trucos de un físico que adoptó a Linux en 1996 ó 1997 y desde entonces no ha querido usar otra cosa en sus computadoras

Otras Bitácoras Interesantes/Útiles

Herramientas de usuario

Valid XHTML 1.0! Valid CSS! Valid RSS 2.0! Valid Atom 1.0!

  • Directorio de Blogs de Venezuela
  • Veneblogs, primer directorio de bitácoras de Venezuela
  • Blogalaxia

powered by
b2evolution
Créditos: Hospedaje por Midphase | Diseño por 315web