3

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?

1 Answers1

2

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.

Khaled
  • 36,533
  • 8
  • 72
  • 99