The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Limiting access to a website to a few IPs

Discussion in 'General Discussion' started by nitaish, Nov 3, 2007.

  1. nitaish

    nitaish Well-Known Member
    PartnerNOC

    Joined:
    Jan 6, 2006
    Messages:
    123
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Mulund, India, India
    Hello,

    We want to limit access to a website only from a few IPs. Only the people connected with those IPs would be able to access the website and the rest of the visitors will be denied the access. Kindly let me know how can it be possible?
     
  2. owine

    owine Active Member

    Joined:
    Jan 10, 2007
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    You can use the .htaccess for a site. Here is an example:

    Code:
    AuthName "My Website"
    AuthType Basic
    <Limit GET POST>
    order deny,allow
    deny from all
    allow from 199.166.210.
    allow from .golden.net
    allow from proxy.aol.com
    allow from fish.wiretap.net
    </Limit>
    This denys all connections except those explicitly allowed with allow lines.
     
Loading...

Share This Page