Last Updated on December 1, 2011 by Dan Nedelko
After my last article on Cleaning your Site after a WordPress Injection Attack I figure that its time to take the old an ounce of prevention us better than a pound of a cute or something like that So here is a nice easy way to enhance your Akismet spam protection and quickly and easily blacklist an offending IP
Personally I get really sick of blog spammers especially since my blog is DoFollow It doesnt stand for the same thing as DoSpam Very annoying time consuming and potentially harmful alot of these same idiots who blog spam would also be the same people who will try to inject your WordPress theme and plugins with Click Counter code
Anyhow in this post Im going to use the following plugins
- Akismet setup properly but that goes without saying
- WP EasyBan
- WP Security Scan
- Secure WordPress
- Redirection Plugin
The first thing you need to do is install all of the above plugins and ensure each of them work As a side note I had trouble with WP EasyBan on WordPress 271 but I corrected it To be honest I am not 100 sure if it was a conflicting plugin issue or a core problem with WP EasyBan If you have a problem contact me or comment here and I will share my fix I wasnt able to see Add Ban in the user menu but a few changes to the plugin fixed it without any issue
Ok moving right along
Lets say you are getting a substantial amount of Spam in your Spam Bin in Akismet You will easily be able to tell if it comes from one particular IP address First go to your Spam Box and identify the IP address see below
Next step Check your Security logs under Tools > Security Logs now if the person is simply annoying you can skip that step but the Security logs will identify if the user is on a blacklist
caption id=attachment 167 align=alignright width=258 caption=Check your Security Log and Blacklistcaption
Once youve done that its time to Add Ban provided by WP EasyBan Its got a great interface for you to add various options We want to add a specific IP address adding a block if IPs could cause you to block legit visitors to your site
caption id=attachment 166 align=alignleft width=341 caption=Adding a Banned IP through WP EasyBancaption
Also as an ounce of prevention you can set a time limit and maybe youll discourage the blog spammers after a period of time The reason I like this method is that Spammers never give up unless they are certain that their stuff is not getting through Blacklisting will let you send a message that there is no getting through to you
As a last note I like to add a personalized message to these idiots Sometime I venture into more colourful language depending on how badly one IP is offending my site and messing with my hard work
Then you can set another site to redirect them to as well Get creative here you can have fun with this there is also a sense of satisfaction to mess around with these people
Anyone else have any tips Let me know
Cheers
Dan Nedelko
[…] Blocking Spam with WordPress […]
Why not delete spam instead of blocking it. Spam is impossible to block and comes in too many forms. I personal prefer to watch my blog an maintain a close eye on comments to make sure things are oki doki
will try easy ban . these spammers are really annoying.
There is a plugin which I came across – IP Address Blocker from LionScripts – http://wordpress.org/extend/plugins/ip-address-blocker/