Access granted to site with specific IP


#1

I am working with a client and they have issued a free proxy within their company for a site I have hosted on Dreamhost. What is the process to only allow access to internal employees at the company. In otherwords, I don’t want any “normal” people from outside the company to have access to this site. Do I have to restrict access to a specific range of IP address’s and how do I go about doing that on Dreamhost?

Thanks in advance.


#2

I think you can do this with a .htaccess file. Carrying the idea a step further, you could allow users from the particular ip or range of ip addresses to access your site without a password, but still allow access by requiring a username and password if the user is not from the correct ip.

Regards,
Rudy


#3

http://wiki.dreamhost.com/KB_/Unix/_.htaccess_files#Deny.2FAllow_Certain_IP_Addresses

[quote]
Order deny,allow
Deny from all
Allow from youripaddress

The above code will block all visitors from accessing your site except for yourself if you replace youripaddress with the IP address that was assigned to you by your ISP. [/quote]
or replace youripaddress with 123.45.67 to cover company range. Try panel goodies or edit your own.


#4

That answers my question. Thanks for the help.