Ban a Spammer via .htaccess

Discussion in 'Security' started by abercrombie, Aug 23, 2008.

  1. #1
    some idiot is going thru the trouble of doing the captha and spamming my joomla comments. i banned him on joomla comments but i also want to ban him via IP address to the entire site. i added his IP address via the script at:

    http://www.hybrid6.com/webgeek/2006/12/htaccess-ip-banning-block-bad-visitors.php

    but i'm sure he's probably gonna come back using a different IP and i'm not sure if the script allows for multiple IPs. anyone know a script they use for banning multiple IP's? i'm currently using:

    # allow all except those indicated here
    <Files *>
    order allow,deny
    allow from all
    deny from 12.34.56.123
    deny from .*domain\.com.*
    </Files>
    Code (markup):
     
    abercrombie, Aug 23, 2008 IP
  2. nirajkum

    nirajkum Active Member

    Messages:
    815
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    58
    #2
    You can use astrix to block the range of IP address. If you want to block the whole area from where he belongs then use * in place of last number
     
    nirajkum, Aug 23, 2008 IP
  3. kailash

    kailash Well-Known Member

    Messages:
    1,248
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    190
    #3
    You can leave the field blank to block entire range. For example, below code will block the access from 127.0.0.0 to 127.0.0.255:

    deny from 127.0.0

    Kailash
     
    kailash, Aug 27, 2008 IP