WordPress.org

Support

Support » How-To and Troubleshooting » Spam – Blocking all comments that start with a certain phrase

Spam – Blocking all comments that start with a certain phrase

  • Lately I’ve been hit by a wave of spam (6,000 and more a day that get past Akismet) and after two weeks of marking them all as spam, it’s no longer fun. However, I’ve noticed that all the comments are of the type:
    I’m agree with you, i think… «keywords»

    Basically, I want to block all the comments that start with that phrase. I’ve tried adding it to the Comment Blacklist and it doesn’t help. I still get that spam. If it matters, the spam is coming from all sorts of ips so I can’t even block that.

    Oh, and I can’t even open the moderation queue since last night though I’ve figured that out:
    (16,500 in moderation, 67,000+ in Akismet)
    http://wordpress.org/support/topic/111419

    Thanks for the help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • whooami

    @whooami

    Member

    do you have mod_security available?

    I can give you exactly what to use to push those far far away if so 🙂

    Yes, apparently I do have mod_security installed. Oh, and the comments are actually like this: (I didn’t realise, my mind skimmed over the top part)
    «keywords»

    I’m agree with you, i think… «keywords» …

    Thanks

    whooami

    @whooami

    Member

    SecFilterSelective REQUEST_URI “^/wp-comments-post.php” chain

    SecFilterSelective POST_PAYLOAD “agree with you\,i think” “redirect:http://www.fbi.gov

    the last 2 line are actually 1 line. drop that into your .htaccess with any other mod_security stuff you have

    I tried that, but it doesn’t seem to stop the spam. In case you’d like to look at my .htaccess:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    
    # END WordPress
    
    SecFilterSelective REQUEST_URI "^/wp-comments-post.php" chain
    
    SecFilterSelective POST_PAYLOAD "agree with you\,i think" "redirect:http://www.fbi.gov"

    Thanks for your help 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Spam – Blocking all comments that start with a certain phrase’ is closed to new replies.
Skip to toolbar