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.

I'd like to be able to have seperate hosts files for different networks on windows 7.

Basically, I have an internal IP address for my web server at home which I was thinking of putting in the hosts file so that I can access it using the external domain name from inside my home network. If I understand correctly though this will mess up routing to the external address when I am on another network (my work network for instance). Is there any way of having an entry in the hosts file that is only ever used on my home network? Or is there a better, more sensible way, of doing this?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

I am not sure if there is such feature available using hosts file.

Usually, this is done using DNS server. You can run you own DNS server and create different view for each IP address/subnet. I configured this using bind on Linux server.

You may find something similar using another DNS servers/OS.

share|improve this answer
    
Thank you Khaled. I'll look into your suggestion. –  Russell Troywest Feb 3 '11 at 12:29

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.