0

With my laptop, when accessing a given domain on the local network, I need to use a local IP address (192.168.x.x).

When accessing the same domain from a remote location, I need to use the public IP address. Since I am accessing the domain via DNS, which always returns the public IP address, how can I make things work using the same domain name regardless of whether I am on the local network or not, without tweaking my hosts file whenever I change locations(which is what I currently do to fix this situation).

RedFilter
  • 423
  • 1
  • 6
  • 17

3 Answers3

3

You need to run an internal DNS server which has the correct internal IP addresses in it.

That DNS server's address could then be picked up from DHCP settings on the LAN.

Alnitak
  • 20,901
  • 3
  • 48
  • 81
  • This seems to be the popular answer. It seems like a lot of work to me...I may instead write a simple utility that modifies my hosts file based on whether I am on the local network or not. – RedFilter May 13 '09 at 18:09
  • it's seriously not that hard, honest... – Alnitak May 13 '09 at 20:27
  • Some additional info from http://stackoverflow.com/questions/367908/free-dns-server-for-windows-xp: there is a version of BIND that will run on Windows XP/2003/2008 (I am currently on XP). – RedFilter May 14 '09 at 15:36
0

I can see you having two possible solutions.

One, setup a VPN of some sort so even while on the road you have direct connectivity to your internal network.

Stop making changes to the hosts file, and instead setup split horizon so when a host is on the inside it gets the inside address, and when a host is on the outside it gets the outside address.

Zoredache
  • 128,755
  • 40
  • 271
  • 413
  • I have VPN access already, but this is a publicly-facing site, so I need general DNS to work properly first and foremost. – RedFilter May 13 '09 at 17:53
0

Would DynaDNS.org be of any assistance?

jherlitz
  • 1,058
  • 1
  • 18
  • 25