Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 9 of 9

This is a discussion on Banning via IP range in the Shared & Semi-Dedicated forum
I am trying to figure out how to ban IP ranges...not just single IP numbers.. Or how to ban an ISP addy such as "wv.rr.com" ...

  1. #1
    JPC Member
    Join Date
    Jan 2004
    Posts
    15

    Banning via IP range

    I am trying to figure out how to ban IP ranges...not just single IP numbers..

    Or how to ban an ISP addy such as "wv.rr.com"

    I have tried via the IP deny manager, but it only seems to accept individual IPs.

    Anyone have an idea?

    Thanks

  2. #2
    JPC Guru
    Join Date
    Jan 2004
    Location
    I'm right behind you....
    Posts
    389
    Just use a hypen (-) between the first and last IP in the range you want to block.

    Find out the IP range of the ISP you want to block and enter it as so:

    69.57.128.0-69.57.159.255

    (that range is for "Everyone's Internet" out of Houston, TX. btw. Just used as an example, I haven't banned them or anything, lol).

    I just put a hyphen between the start of their range (69.57.128.0) and the end of their range (69.57.159.255).

    Easy. Hope that helps.

  3. #3
    Kubla Khan lookout's Avatar
    Join Date
    Aug 2002
    Location
    Orodruin
    Posts
    1,386
    You can set up commands in an .htaccess file to do that.

    To deny a specific domain, add to it a line like so:

    deny from wv.rr.com


    To deny the IP range beginning with 69.38.144:

    deny from 69.38.144

    Much more on the topic is available from the apache.org site. See this
    section on the Allow, Deny, Order directives there.

    If you're unfamiliar with .htaccess files, searching on the term in the forums should yield you some tips on making them and some of their uses.
    The trouble with our times is that the future is not what it used to be.
    - Paul Valery

  4. #4
    Kubla Khan lookout's Avatar
    Join Date
    Aug 2002
    Location
    Orodruin
    Posts
    1,386
    Must have crossposted, Galen.

    I haven't seen that method before; sounds good though. Have to try it myself one of these days.
    The trouble with our times is that the future is not what it used to be.
    - Paul Valery

  5. #5
    JPC Guru
    Join Date
    Jan 2004
    Location
    I'm right behind you....
    Posts
    389
    Well, I've never had to use it, so I can't verify it. I can only say that's how it's SUPPOSED to work

  6. #6
    JPC Member
    Join Date
    Jan 2004
    Posts
    15
    Using a hypen (-) does not work..any other ideas?

    Thanks!

  7. #7
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    You don't want to do this with .htaccess. In fact, it would be undeniably stupid to do it that way, unless you actually dislike traffic!

    There is no easy way to block ranges of IP's using .htaccess. To block a single IP you would need something like:

    Code:
    order allow,deny
    allow from all
    deny from 209.180.217.140
    To block a range of IPs, you would have to enter each one manually, since you don't want to block the whole class C:

    Code:
    order allow,deny
    allow from all
    deny from 209.180.217.140
    deny from 209.180.217.141
    deny from 209.180.217.142
    deny from 209.180.217.143
    deny from 209.180.217.144
    deny from 209.180.217.145
    deny from 209.180.217.146
    And, so on....
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

  8. #8
    Old Hillbilly Connie's Avatar
    Join Date
    Sep 2001
    Location
    Hills of Missouri
    Posts
    2,646
    Just curious. Would blocking an address also block that address
    from hotlinking.

    Actually I want to block the domain not the IP Address.

    I am referring to using .htaccess to do this.

    Last edited by Connie; 02-13-2004 at 06:40 PM.

    Forum Moderators - Jag Staff

    Spam Whackers Blog - Dedicated to fighting Spam and providing General SEO Tips
    Organize your Kitchen or purchase Kitchen Accessories at Condells
    Ihelpyou Forum - Dedicated to "Best Practices" SEO

  9. #9
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775

    Re: Banning via IP range

    Originally posted by Sherrie
    ...how to ban an ISP addy such as "wv.rr.com"...
    Originally posted by clssam
    Actually I want to block the domain not the IP Address.

    I am referring to using .htaccess to do this...
    Oops! I just reread the thread. To do what you want, you need to use:

    Code:
    <Limit GET PUT POST>
    order allow,deny
    deny from wv.rr.com
    allow from all
    </Limit>
    Don't listen to these other guys. Forget about banning whole continents, just to get rid of one problem user...
    Last edited by Vin DSL; 02-13-2004 at 06:49 PM.
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •