Allowing Only Certain Ips'

Discussion in 'Site & Server Administration' started by docquesting, Sep 11, 2005.

  1. #1
    I have a contact page on one of my sites that I only want people from my state to be able to view. Is there anyway to ban all other ips on any certain page and allow only specific ones from a certain area? Also I would need to have a notice why they have been banned. Thanks so much.
     
    docquesting, Sep 11, 2005 IP
  2. just-4-teens

    just-4-teens Peon

    Messages:
    3,967
    Likes Received:
    168
    Best Answers:
    0
    Trophy Points:
    0
    #2
    there is a way to ban / allow ips via .htaccess not sure how its done maybe you search google for it.

    EDIT
    after a quick search i believe the code for htaccess will look something like

    <Limit GET>
    order allow,deny
    deny from 123.123.123.123
    deny from 456.456.456.*
    deny from 789.789.*.*
    allow from all
    </Limit>
    Code (markup):
    the above will block ips on that range and allow all the rest or

    <Limit GET>
    order allow,deny
    allow from 123.123.123.123
    allow from 456.456.456.*
    allow from 789.789.*.*
    deny from all
    </Limit>
    Code (markup):
    would do the opposite
     
    just-4-teens, Sep 11, 2005 IP
  3. docquesting

    docquesting Active Member

    Messages:
    54
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    98
    #3
    And how do I know what to enter just for my state alone? I know nothing about htaccess and hopefully can figure this out. Also will I be able to put up a notice that you have been banned from veiwing this form b/c ect along with that?
     
    docquesting, Sep 11, 2005 IP
  4. just-4-teens

    just-4-teens Peon

    Messages:
    3,967
    Likes Received:
    168
    Best Answers:
    0
    Trophy Points:
    0
    #4
    just-4-teens, Sep 11, 2005 IP
  5. iTISTIC

    iTISTIC Peon

    Messages:
    140
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #5
    There is no way you can do this by putting a few entries in your .htaccess file, or configuring IIS properly if you are on a Windows server.

    There are products available that you can use programatically to determine an approximate geographic location based on a user's IP address. NONE of these products are 100% correct, however. I've found that the BEST ones (which are very costly) are about 75% correct.

    What I would suggest is developing this page and integrate it with one of these products to determine the users location. If they are not located in your state you could display the ban page, if not display the form. Since these products are not 100% correct, however, you'll surely end up blocking a small amount of users in your local state. I would suggest providing a way to get to the form even IF the code determines that they reside in your local state.

    I'd be more than willing to assist you with this project. Let me know if you are interested.
     
    iTISTIC, Sep 11, 2005 IP
  6. classifieds

    classifieds Sopchoppy Flash

    Messages:
    825
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    150
    #6
    Its almost impossible to use Geo IP at the state level.

    Examples are:
    - AOL (all traffic looks like it comes from Northern Virgina).
    - ISPs that do not segment their IP address space.
    - ISPs that use proxy servers located in a different state.
    - Anonymous proxy servers.

    What is your application written in? If it was Mambo or Drupal or some other CMS you should be able to do this with the built in access control / user rights to create pages that only certain users can see.

    -jay
     
    classifieds, Sep 11, 2005 IP
  7. docquesting

    docquesting Active Member

    Messages:
    54
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    98
    #7
    Hmm not so good if 100% percent but I can understand why. I really cant reveal the nature of what I am trying to do. If not 100% probably no use even thinking about it. I am marketing my site to a certain type of person and didnt want others to contact me outside of the state. This probably all sounds strange and I suppose it probably is a strange project. I also wouldnt be able to afford to pay for any software. (IT) if you still want to take a look pm me and Ill send you the link. Thanks.
     
    docquesting, Sep 11, 2005 IP
  8. classifieds

    classifieds Sopchoppy Flash

    Messages:
    825
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    150
    #8
    classifieds, Sep 11, 2005 IP
  9. iTISTIC

    iTISTIC Peon

    Messages:
    140
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #9
    You can't rely on what people fill out in a form (when they creat an account, etc.) because there may be people who do want to get to the form who are not really geographically located in your state.

    Have you thought of some sort of manual validation process you could put in place to validate a user is actually located in a specific state?
     
    iTISTIC, Sep 11, 2005 IP
  10. docquesting

    docquesting Active Member

    Messages:
    54
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    98
    #10
    What do you suggest so far as manual goes?
     
    docquesting, Sep 11, 2005 IP
  11. classifieds

    classifieds Sopchoppy Flash

    Messages:
    825
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    150
    #11
    You could

    - require they send you a copy of a utility bill (power, phone, gas).
    - charge them a very small membership fee via credit card and use billing address verification.
    - postal mail them an activation post card.
    - have them enter a phone number (not a cell phone) and 1). call it to verify and 2). look up what state its located in via the reverse lookup.

    I'm sure there are other methods but it really depends on how valuable each registered user is and how much trouble you are willing to go through.

    The more barriers you place between registration and use of the site the fewer members you will have.

    -jay
     
    classifieds, Sep 12, 2005 IP
  12. iTISTIC

    iTISTIC Peon

    Messages:
    140
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Do you have any way you could validate a user is from your local state? Faxing/mailing a copy of their photo ID after signing up, etc? That typically doesn't work well, but it may depending on what type of site you have.
     
    iTISTIC, Sep 12, 2005 IP