1

I have a WordPress blog that I am hosting using NearlyFreeSpeech.net. Recently, Russians found it and have been comment spamming me. I don't want to have to trash 30+ Cyrillic comments/day, and I don't want to pay for that bandwidth either.

I did a little research, and all the commentors are originating from RIPE delegated IP ranges. Because my blog can only interest people living in the American Southeast, I figured the quick and dirty solution would be to use .htaccess to deny connections coming from 62.0.0.0/8 and 80.0.0.0/8 - 91.0.0.0/8. I wrote a .htaccess file that did just this, but the Russians were still getting through!

According to NearlyFreeSpeech.net's FAQ, they can't support IP blocking through .htaccess (dirt cheap hosting comes with a price). I can block comments by IP through Wordpress (I think), but I can't figure out a way to block IP ranges or wildcards.

Does anybody know of any other way?

Chris
  • 347
  • 3
  • 6
  • 13

3 Answers3

2

Are you using the akismet plugin? This deals with comment spam quite efficiently

matpol
  • 318
  • 1
  • 5
2

You should really use a plugin that can prevent comment spam, if you block Russia you will just get spam from somewhere else. Blocking countries via IP address is not really effective either, not all net blocks we're geographically distributed. I bet you can find some north American networks that have net blocks assigned to other countries.

You'll also so forget your doing filtering in a years time , you'll be on holiday in Russia one day and you'll ask again why you can't access your blog from Russia ;-).

Captcha's are effective, also look at things like openid (which this sites uses!).

Again something like mod_security can be configured to prevent spam bots, it takes time and effort to get right, but sometimes worth it if your experiencing high server load or massive bandwidth consumption from spammers.

The Unix Janitor
  • 2,458
  • 15
  • 13
0

Read :Jay's PHP Form to Email with Anti-Spam Features http://thescriptcenter.com/php-form-to-email-documentation.html Mike