I'm thinking of blocking all IP adresses indicated by Akismet as containing spam. Something like cronning

select distinct wp_comments.comment_author_IP
FROM  `wp_commentmeta` JOIN `wp_comments`
WHERE wp_commentmeta.comment_id = wp_comments.comment_id
  AND wp_commentmeta.meta_value='true'
ORDER BY wp_comments.comment_author_IP

and then adding the IP's automatically to .htaccess.

Even better, I would like to post the current list of 524 IP's to a webservice to be sure hundreds of other people are also blocking the same IP.

Is that smart?

update now checking with http://www.dnsbl.info/ . Interesting e.g. is listed with one of the spam database but not others. So I probably need to write a plugin that auto blocks the IP and then refer them to DSNBL if they want to unblock themselves. IS there already a DSNBL plugin?

update apparantly (ofcourse) there is : http://wordpress.org/support/topic/visitors-checked-by-dnsbl

  • no. spammer can change his ip – onetrickpony Dec 23 '10 at 22:46
  • @Ambitious Amoeba - They can change their IP, but it cost them time and money. If enough people block then sooner or later some will give up. – MikeSchinkel Dec 24 '10 at 0:44
  • 1
    I use Akismet and I get more and more spam every day, not less. If I look on the spam page, around 10-15% are false positives. So banning IPs is not a good idea at all. What's the point if you're using Akismet anyway? And if there is a reason, does it worth loosing at least 10% of your legit visitors? – onetrickpony Dec 24 '10 at 1:25
  • I realize that so I added some more heuristics: IP's that show up in the locked down table ... ips that are listed in the open black list tables around the net , combined with IP's that are reported by WP firewall and where I see really bad requests etc... – edelwater Dec 24 '10 at 3:26

Personally I highly recommend to not use IP blocks at .htaccess level. There are simply too many false positives possibilities for that to work reliably. I had encountered WP blogs (luckily wave of those seem to have faded) that just shut me out, accusing my IP of belonging to evil spamer... Static IP that belonged to me for years.

I especially don't recommend to use Akismet as source of data. Your mileage may differ, but as commenter I had experienced so many false positives with Akismet that I will never touch it as blogger.

What I do recommend:

  • use spam filtering methods or sources you are 100% confident will not produce excessive amounts of false positives;
  • do not block out by IP, send matched IP to spam and display informational message about why it was blocked and your means of contact.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.