Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to restrict access to a development website?

I have a site i am working on that i would like to display only to a few others for now. Is there anything wrong with setting up windows user names and using windows auth to prompt the user before getting into the development site?

like image 403
zsharp Avatar asked Feb 21 '09 23:02

zsharp


People also ask

How do I restrict access to a website?

Restricting access to web pages takes two steps. First, you create a file containing the usernames and passwords. Second, you tell the server what resources are to be protected and which users are allowed to access them, after entering a valid password. A list of users and passwords needs to be created in a file.


2 Answers

There are several ways, with varying degrees of security:

  • Don't put it on the internet - put it on a private network, and use a VPN to access it
  • Restrict access with HTTP authentication (as you suggest). The downside to this is it can interfere with the actual site, if you are using HTTP auth, or some other type of authentication as part of the application.
  • Restrict access based on remote IP. Just allow the IPs of users you want to be able to access it.
  • Use a custom hostname. Have it on a public IP, but don't publish the hostname. This means make an entry in your HOSTS file (or configure your own DNS server, if possible) so that "blah.mysite.com" goes to the site, but that is not available on the internet. Obviously you'd only make the site accessible when using that hostname (and not the IP).
like image 65
gregmac Avatar answered Oct 27 '22 11:10

gregmac


That depends on what you mean by "best": for example, do you mean "easiest" or "most secure"?

The best way might be to have it on a private network, which you attach to via VPN.

like image 27
ChrisW Avatar answered Oct 27 '22 11:10

ChrisW