How to deny specific IP from accessing my site?

Discussion in 'Apache' started by ashiezai, Oct 1, 2006.

  1. #1
    Hi there. I wanted to block 69.73.169.176 from my site.

    My code was:

    Is my .htaccess correct? Because I couldnt block 69.73.169.176. The same user keep accessing my site. I would say it is a robot. (accessed more than 1million pages in 1 month)


    Please educate me about this. Thanks!
     
    ashiezai, Oct 1, 2006 IP
  2. classifieds

    classifieds Sopchoppy Flash

    Messages:
    825
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    150
    #2
    That should work but you may want to consider excluding the entire range of the hosting company 69.73.128.0/18 .

    Also, dig through your httpd log files and make sure that that is in fact the address.

    -jay
     
    classifieds, Oct 1, 2006 IP
  3. ashiezai

    ashiezai Peon

    Messages:
    927
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Well, thanks for the reply. I have tried to look at the log file but I didnt find anything useful.

    Thanks again. But i will now contact my host to see what they can do. :)
     
    ashiezai, Oct 1, 2006 IP
  4. explorer

    explorer Well-Known Member

    Messages:
    463
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    110
    #4
    I've blocked IP's successfully before.

    Just a small part what you quoted is sufficient to block an IP. This is all you need to put in your .htaccess:

    order allow,deny
    deny from 69.73.169.176
    deny from 123.12.122.11
    allow from all
     
    explorer, Oct 1, 2006 IP
  5. ashiezai

    ashiezai Peon

    Messages:
    927
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #5
    well, I tried that in my .htaccess and no luck. Those 2 ips keep coming back.

    So i mailed my host, they ask me to do the blocking via my shell's firewall. I've successfully block one, but 69.73.169.176 is just too annoying... it is still persistently coming ... :(
     
    ashiezai, Oct 2, 2006 IP
  6. 2mob.net

    2mob.net Peon

    Messages:
    61
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Are you using iptables? Just add this rule near the top of your input chain.
    -A INPUT -s xxx.xxx.xxx.xxx -j DROP

    This will drop them cold:D
     
    2mob.net, Oct 2, 2006 IP