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.

Setup:

I have two separate networks I need to connect to at the same time.

VPN 1 PPTP

IP     : 192.168.2.0/24
DNS    : 192.168.2.32; 192.168.2.34 (Windows 2003)
Domain : old.com
Forwarder : 192.168.2.1 (Gateway running DNS) DD-WRT

VPN 2 OpenVPN using Routing -- I'm going to switch to bridging

IP     : 192.168.10.0/24
DNS    : 192.168.10.10 (Windows 2008)
Domain : xyz.dc
Forwarder : 192.168.10.1 (Gateway running DNS) ClearOS

When I'm connected I would like to resolve host names on both networks without fully qualifying them.

UPDATE:

I'm not the only one connecting to this set up so setting up a local DNS would be unmanageable. I have total control over both networks, so making changes isn't an issue. I just don't know what changes to make. :S

share|improve this question

3 Answers 3

You could setup your own DNS server (locally) as a secondary server for both domains. That way, your DNS server would answer queries for both domains and yet allow you access to both domains properly. You would have to ensure that both domains are setup to allow you to make your local server a secondary DNS server for the respective domains.

share|improve this answer
1  
If you choose bind9, you can set up forward zones for this purpose. This causes bind to simply redirect the requests to a chosen server, without the need to AXFR the entire zone. –  grawity Feb 4 '11 at 9:30
    
Good point on bind9's forward zones. I believe Windows 2008's DNS can do this as well –  tegbains Feb 4 '11 at 20:54

You could run a local dnsmasq forwarder. It's very lightweight and has the ability to forward to different servers for different domains, and then your default (ISP) nameservers for everything else. See the 'server' option in the man page.

You can specify multiple search domains on most OSes. That will let you use just the hostname without the FQDN. If you're on a *nix, /etc/resolv.conf would have something like (assuming you run dnsmasq on localhost):

nameserver 127.0.0.1
search old.com xyz.dc
share|improve this answer

Remove the forward on both the remote networks.

Then configure each computer on the remote network to have two DNS servers. The local and the ISP's.

Then when a VPN client goes to look up a server if the remote DNS doesn't know about it the look up will fail and the client will move on to the next DNS server.

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.