Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

All,

I have developed an internal website for a firm and then need to restrict access to only the internal workers. i.e. connected to their own wireless network. For anyone outside the network, the website should not open up at all. For those in the network, username/password should be prompted?

How can I:
1 > Check for the access depending on IP address?
2 > Check for username/password prompt if IP address is valid?

share|improve this question

migrated from stackoverflow.com May 18 '11 at 0:57

This question came from our site for professional and enthusiast programmers.

    
We need more information: 1. what web server are you running. 2. where is the username/password stored? –  toneplex May 17 '11 at 21:42
    
More information as in ? Please be specific. Since I have never done this before, I don't know what would be needed –  darkie15 May 17 '11 at 21:43

2 Answers 2

up vote 0 down vote accepted

I'm going to post my answer assuming you used apache. You can do this but you need to generate the users/password file so have a look at the documentation for that.

<Location />
  Order Deny,Allow
  Allow from company.com
  Deny from all
  Require user someuser
  Require user someotheruser
</Location>
share|improve this answer

Unless you have requirements other than protecting the site from users in the outside world, you don't need to do any form of authentication as the intranet site should be hosted on a server local to the intranet and with no form of connection to the outside world.

share|improve this answer
1  
In other words, the website is behind the firewall, invisible to internet users. –  Robert Harvey May 17 '11 at 22:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.