Htaccess Denying IP help

Discussion in 'Water Cooler' started by Michael, Nov 22, 2009.

  1. Michael

    Michael Regular Member

    Joined:
    Jan 18, 2004
    Messages:
    166
    Likes Received:
    35
    Hi there,

    Is it possible to use:

    HTML:
    deny from adsl.tesco.net
    within a htaccess?

    Thanks :)
     
  2. Dan Hutter

    Dan Hutter aka Big Dan

    Joined:
    Jul 20, 2006
    Messages:
    1,412
    Likes Received:
    515
    Location:
    New York
    I'm pretty sure you have you use an IP Address or IP range as Apache (the web server) doesn't resolve the IPs before processing htaccess.
     
    2 people like this.
  3. Michael

    Michael Regular Member

    Joined:
    Jan 18, 2004
    Messages:
    166
    Likes Received:
    35
    Damn, if I was to provide you an IP could you provide me with the range if that is possible? Thanks!
     
  4. Michael

    Michael Regular Member

    Joined:
    Jan 18, 2004
    Messages:
    166
    Likes Received:
    35
    Is this correct:

    deny from 83.104

    will work exactly the same as

    deny from 83.104.0.0/16?

    Thank you :)
     
  5. Nick

    Nick Regular Member

    Joined:
    Jul 27, 2008
    Messages:
    7,441
    Likes Received:
    218
    Post or PM the IP.
     
  6. Dan Hutter

    Dan Hutter aka Big Dan

    Joined:
    Jul 20, 2006
    Messages:
    1,412
    Likes Received:
    515
    Location:
    New York
    Yes it should; that's how I've always seen ranges formatted though I've never used a range directly in .htaccess. If your running cPanel with IP Deny Manager does the htaccess edit automatically if that makes you feel safer. :)

    This might help a screenshot from cPanel showing how ranges work, the links don't go anywhere so I cannot get any more information.

    View attachment 749
     
    2 people like this.
  7. Michael

    Michael Regular Member

    Joined:
    Jan 18, 2004
    Messages:
    166
    Likes Received:
    35
    Thanks for that, im alright adding single IP's to htaccess manually. I think I will have to leave this one as the IPs in question are all varying right at the beginning so we would be denying anyone beginning with 70. for example :(
     
  8. Dan Hutter

    Dan Hutter aka Big Dan

    Joined:
    Jul 20, 2006
    Messages:
    1,412
    Likes Received:
    515
    Location:
    New York
    Are they registered members.. Even if not you can always ban IPs one by one in vBulletin options > User Banning Options. I'll use that over htaaccess just because it's easier IMHO.
     

Share This Page