Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Sep 2004
    Posts
    523

    Talking Modsecurity ACL rules to stop spam

    I was receiving a lot bounces at the Exim queue caused by spam posted in contact forms. So I setup this rule at /etc/httpd/conf/modsec.user.conf (also works for post made in guestbooks or forums)

    All post containing the specified words will be refused with a 406 error.

    In this case we block viagra, pharmacy, mortgage, loan, Anatrim, casino, etc words.

    SecFilter "(viagra|pharmacy|phentermine|symbol|mortgage|pills|prozac|xanax|loan|
    loans|roulette|casino|poker|blackjack|watches|valium|tramadol|carisoprodol|morta
    ge|Anatrim|FINANZINVESTOREN)"
    SecFilterSelective HTTP_REFERER "(viagra|pharmacy|phentermine|symbol|mortgage|pi
    lls|prozac|xanax|loan|loans|roulette|casino|poker|blackjack|watches|valium|trama
    dol|carisoprodol|mortage|Anatrim|FINANZINVESTOREN)"
    SecFilterSelective POST_PAYLOAD "(viagra|pharmacy|phentermine|symbol|mortgage|pi
    lls|prozac|xanax|loan|loans|roulette|casino|poker|blackjack|watches|valium|trama
    dol|carisoprodol|mortage|Anatrim|FINANZINVESTOREN)"
    SecFilterSelective HTTP_REFERER|ARGS "(natural|penis|male).*(enlarg.*|enhanc.*)"


    If anyone has more words or spam that are received frequently please post it here to help others.
    We could make a list and I can update the post with them.

    Thank you.

    BsAs Ninja
    Last edited by bsasninja; 04-30-2007 at 08:14 AM.

  2. #2
    Member
    Join Date
    Feb 2005
    Posts
    312

    Default

    Quote Originally Posted by bsasninja View Post
    I was receiving a lot bounces at the Exim queue caused by spam posted in contact forms. So I setup this rule at /etc/httpd/conf/modsec.user.conf (also works for post made in guestbooks or forums)

    All post containing the specified words will be refused with a 406 error.

    In this case we block viagra, pharmacy, mortgage, loan, Anatrim, casino, etc words.
    ...
    lets hope none of your hosting clients are running a financial forum.. they'll be disappointed.

    I think being aggressive about spam is a great thing, but there's such a thing as too much.
    ideally, you should be watching for multiple similar posts and then multiple repeated posts from the same IP's...

    encouraging people to use forum software which has anti-spam features will be a much better solution.

    I tend to recommend phorum ( www.phorum.org ),
    there are also akismet plugins for wordpress, etc...

    this way, if someone does have a forum wherein people would legitimately discuss the things you're blocking, they wont have issues.

  3. #3
    Member
    Join Date
    Sep 2004
    Posts
    523

    Default

    Anyways I dont have clients running gambling, drugs, sex sites (cause i dont accept them)
    and if that was the case I just disable the rules for that specific domain.

    Here is a link with some handy rules to stop this types of referrer spam http://www.ilovejackdaniels.com/apac...referrer-spam/

Similar Threads & Tags
Similar threads

  1. ModSecurity Rules
    By Angel78 in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 04-08-2009, 11:20 AM
  2. Automatic modsecurity rules updater
    By mikegotroot in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-07-2009, 05:20 PM
  3. ModSecurity rules for apache 2.2.x
    By cesarlwh in forum New User Questions
    Replies: 1
    Last Post: 03-14-2009, 07:04 AM
  4. Upgrade ModSecurity Rules
    By Piolon in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 03-15-2008, 07:24 AM
  5. Old ACL/RBL rules X New ACL/RBL rules with CPANEL 11
    By duranduran in forum E-mail Discussions
    Replies: 2
    Last Post: 06-19-2007, 08:01 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube