Blocking Spammers IP ?

Discussion in 'Apache' started by ish1301, Dec 1, 2006.

Thread Status:
Not open for further replies.
  1. #1
    Hi

    can i block spammer's IP with htaccess, if yes please tell me how ...

    thanks for any help.

    Ish
     
    ish1301, Dec 1, 2006 IP
  2. Smyrl

    Smyrl Tomato Republic Staff

    Messages:
    13,740
    Likes Received:
    1,702
    Best Answers:
    78
    Trophy Points:
    510
    #2
    Yes it is quite simple.

    You can block an IP address by using:

    deny from 000.000.000.000

    where 000.000.000.000 is the IP address. If you only specify 1 or 2 of the groups of numbers, you will block a whole range. See
    http://www.freewebmasterhelp.com/tutorials/htaccess/2 or other .htaccess tutorials.

    You are indeed fortunate if spammer is always hitting from same IP or range of IP's.

    Good luck.
     
    Smyrl, Dec 1, 2006 IP
    ish1301 and sundaybrew like this.
  3. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Shannon is right.

    But you will probably want to automate it. Depending on what sort of spam, comment or email, you will need to fetch their IP and write it to the htaccess file.

    Or within your application.
     
    T0PS3O, Dec 1, 2006 IP
    ish1301 likes this.
  4. ish1301

    ish1301 Banned

    Messages:
    77
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    thanks, i never thought it would be so easy :)
     
    ish1301, Dec 1, 2006 IP
Thread Status:
Not open for further replies.