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

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).

share|improve this question
add comment

3 Answers

up vote 3 down vote accepted

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.

share|improve this answer
    
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 stackoverflow.com/questions/367908/…: 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
add comment

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.

share|improve this answer
    
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
add comment

Would DynaDNS.org be of any assistance?

share|improve this answer
    
I do not see how - it can be configured to server up any IP address, but only one and I need a variable IP. I currently use <a href="zoneedit.com/">zoneedit</a>;. –  RedFilter May 13 '09 at 17:52
add comment

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.