Blocking Spam with Wordpress

April 7, 2009

VN:F [1.9.3_1094]
Take a moment to Rate and Review this article:
Rating: 10.0/10 (1 vote cast)

Block­ing Spam with Word­press, 10.0 out of 10 based on 1 rating

After my last arti­cle on Clean­ing your Site after a Word­press Injec­tion Attack I fig­ure that it’s time to take the old “an ounce of pre­ven­tion us bet­ter than a pound of a cute” (or some­thing like that). So here is a nice easy way to enhance your Akismet spam pro­tec­tion and quickly and eas­ily black­list an offend­ing IP.

Per­son­ally I get really sick of blog spam­mers, espe­cially since my blog is DoFol­low. It doesn’t stand for the same thing as DoSpam. Very annoy­ing time con­sum­ing and poten­tially harm­ful — alot of these same idiots who blog spam would also be the same peo­ple who will try to inject your Word­press theme and plu­g­ins with Click Counter code.

Any­how in this post I’m going to use the fol­low­ing plugins:

  1. Akismet (setup prop­erly but that goes with­out saying.)
  2. WP-EasyBan
  3. WP Secu­rity Scan
  4. Secure Word­press
  5. Redi­rec­tion Plugin

The first thing you need to do is install all of the above plu­g­ins and ensure each of them work. As a side note: I had trou­ble with WP-EasyBan on Word­press 2.7.1 but I cor­rected it. To be hon­est I am not 100% sure if it was a con­flict­ing plu­gin issue or a core prob­lem with WP-EasyBan. If you have a prob­lem, con­tact me or com­ment here and I will share my fix (I wasn’t able to see “Add Ban” in the user menu but a few changes to the plu­gin fixed it with­out any issue).

Ok mov­ing right along.

Let’s say you are get­ting a sub­stan­tial amount of Spam in your Spam Bin in Akismet. You will eas­ily be able to tell if it comes from one par­tic­u­lar IP address. First go to your Spam Box and iden­tify the IP address — see below:

One: Identfy the IP Address

Next step: Check your Secu­rity logs under “Tools -> Secu­rity Logs” — now if the per­son is sim­ply annoy­ing you can skip that step but the Secu­rity logs will iden­tify if the user is on a blacklist:

Is the IP already on your Blacklist?

Check your Secu­rity Log and Blacklist

Once you’ve done that it’s time to “Add Ban” pro­vided by WP-EasyBan. It’s got a great inter­face for you to add var­i­ous options. We want to add a spe­cific IP address (adding a block if IP’s could cause you to block legit vis­i­tors to your site.

Adding an entry to your Blacklist

Adding a Banned IP through WP-EasyBan

Also as an ounce of pre­ven­tion you can set a time limit and maybe you’ll dis­cour­age the blog spam­mers after a period of time. The rea­son I like this method is that Spam­mers never give up unless they are cer­tain that their stuff is not get­ting through. Black­list­ing will let you send a mes­sage that there is no get­ting through to you.

As a last note: I like to add a per­son­al­ized mes­sage to these idiots. Some­time I ven­ture into more colour­ful lan­guage depend­ing on how badly one IP is offend­ing my site and mess­ing with my hard work.

Then you can set another site to redi­rect them to as well. Get cre­ative here you can have fun with this, there is also a sense of sat­is­fac­tion to mess around with these people.

Any­one else have any tips? Let me know!

Cheers,

Dan Nedelko

Dan Nedelko

VN:F [1.9.3_1094]
Rat­ing: 0 (from 0 votes)

Related posts:

  1. Word­press Injec­tion Attack

Comments

2 Responses to “Blocking Spam with Wordpress”

  1. Wordpress Exploit Gumblar .cn by Dan Nedelko on May 15th, 2009 11:12 am

    […] Block­ing Spam with Wordpress […]

  2. Naz on March 2nd, 2010 9:00 am

    Why not delete spam instead of block­ing it. Spam is impos­si­ble to block and comes in too many forms. I per­sonal pre­fer to watch my blog an main­tain a close eye on com­ments to make sure things are oki doki

Join in on the Discussion! Comment Now: