how do I specify a specific ip range in htaccess?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • adultguus
    Confirmed User
    • Jul 2004
    • 815

    #1

    how do I specify a specific ip range in htaccess?

    Let's say I want to deny access to people from a specific ip range. How do I do that in htaccess?

    Example, lets say I want to ban everyone with an ip from:
    192.168.0.65 to 192.168.4.93

    I don't know how to specify this range. I understand how the ban is be done:

    Code:
    order allow,deny
    allow from all
    deny from 192.168.0.65 to 192.168.4.93
    I understand that when it would be 192.168.0.0 to 192.168.0.999 you can enter 192.168.0

    Hope you guys and girls can help me out.
    Want to have your own review site in 2 minutes? Visit us now!
    For the surfers: Porn Reviews
  • adultguus
    Confirmed User
    • Jul 2004
    • 815

    #2
    Come on, somebody should know this.
    Want to have your own review site in 2 minutes? Visit us now!
    For the surfers: Porn Reviews

    Comment

    • BackToMine
      Confirmed User
      • Nov 2004
      • 541

      #3
      did you try:
      deny from 192.168.0.65-93

      Comment

      • vickyQ
        Confirmed User
        • Nov 2004
        • 141

        #4
        iptable with the / character :-)
        Hosting, domain name registrations and server security

        contact us for custom hosting offer

        Comment

        • Robx
          Confirmed User
          • Nov 2004
          • 357

          #5
          How about this:

          order allow,deny
          deny from 123.45.6.7
          deny from 012.34.5.
          allow from all

          Contact Us About Getting Your Paysites Exposed To Millions Of People On The Peer To Peer Networks!
          ICQ 124-249-781

          Comment

          • Twe Russ
            Confirmed User
            • Jan 2003
            • 3493

            #6
            werd Deny!

            Contact information - ICQ: 7.9.0.3.0.0 · AIM: no roach · E-Mail: roachito || @ || gmail || . || com
            [Friend Finder - Geo Targeting & Incredible Site Ratio] - [Credit Card Traffic - Make $65 Per Join]

            Comment

            • fusionx
              Confirmed User
              • Nov 2003
              • 4618

              #7
              Originally posted by adultguus
              Let's say I want to deny access to people from a specific ip range. How do I do that in htaccess?

              Example, lets say I want to ban everyone with an ip from:
              192.168.0.65 to 192.168.4.93

              I understand that when it would be 192.168.0.0 to 192.168.0.999 you can enter 192.168.0

              Hope you guys and girls can help me out.
              Unfortunatly you can not do anything like 0.0.0.0-22

              You have to use full IPs or subnets.

              The easiest way for you to block that range would be:

              order allow,deny
              deny from 192.168.0.65
              deny from 192.168.0.66
              deny from 192.168.0.67
              etc
              deny from 192.168.0.254
              deny from 192.168.1
              deny from 192.168.2
              deny from 192.168.3
              deny from 192.168.4.1
              deny from 192.168.4.2
              deny from 192.168.4.3
              deny from 192.168.4.4
              deny from 192.168.4.5
              etc
              deny from 192.168.4.93
              allow from all


              yeah - it sucks.

              Comment

              • Sams_gfy
                Confirmed User
                • Aug 2004
                • 491

                #8
                Hmm... Why don't use netmask ? 192.168.4.0/255.255.255.240 - IP range from 192.168.4.0 to 192.168.4.15
                Work with PPC SE ( Umax, 3FN Marketing) and GET PAID FOR EVERY CLICK !!!
                Next step after PPC - Pay Per Lead/Action
                Good, filtered traffic: Chocker, Traffic Holder || My favourite hosting: HQ Host

                Comment

                Working...