Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If I am in the office I want server.mycompany.com to resolve to 192.168.2.2.

If I am in the wild I want server.mycompany.com to resolve to whatever mycompany.dyndns.com resolves to.

Windows 7. How can I do that?

share|improve this question
1  
so... server.mycompany.com isn't a real address? that is, a real DNS will give you an address for mycompany.dyndns.com, but not for server.mycompany.com? (or server.mycompany.com is resolvable, but resolves to something other than mycompany.dyndns.com?) –  quack quixote Nov 18 '09 at 19:15
    
The odd reference to mycompany.dyndns.com aside, I guess Geoff's answer is correct for your situation. For more generic location-aware preferences see alternativeto.net/desktop/marcopolo/?platform=windows –  Arjan Nov 18 '09 at 21:18

2 Answers 2

You don't state whether or not this an office you have control over (a home office, for example). I'll assume you do have control.

Set up your in-office DNS server with your desired record. When you are out of the office, the DNS servers you get access to will use the the "normal" records.

As for how to do this? If your wireless or broadband router does not let you add specific DNS records (which would override the need to hit the internet to resolve server.mycompany.com), you will need to set up your own DNS server with that record, and then forward all other queries to the internet. To make a seamless switch between office and non-office, use DHCP in the office to feed your machine your own custom DNS server, otherwise your machine will be given some other name server when out in the wild.

There are lots of Windows DNS server solutions, free or otherwise. I'll leave that research to you.

share|improve this answer

If your office runs Simple DNS Plus (a DNS server for Windows), you can use the "NAT IP Alias" feature. This ensures that you get the private IP address when accessing the site from the LAN, but the public IP address when accessing from anywhere else. See http://www.simpledns.com/help/v52/wd_opt_dnsnatlan.htm

share|improve this answer

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.