So, I’m on day 3…
I am running an Ubuntu.64-based distribution on a VirtualBox. I have the need to access both external ISP DNS servers, as well as “internal” DNS servers through an OpenVPN connection. At times I need to query the external DNS(#host example.com) through the eth0 interface; sometimes I need to query the VPN “internal” DNS (#host internal.local) through the tap0 interface.
My question is: how do I configure my system to query the correct nameserver– the ISP DNS or the VPN DNS (for attempting zone transfers, for example)?
I’ve tried editing resolv.conf to include both external and internal nameservers/domains, with no luck (obviously). I’ve also tried mitigating the situation with dnsmasq. That got me close (I think).
I realize I can use dig to set the [@server] based on individual queries, but I would appreciate a systemic resolution.
Any help would be appreciated.
I’ve used the PowerDNS recursor for exactly this situation before; it is in the package
pdns-recursor, if you wish to try it. You’ll want to set your/etc/resolv.confto query only127.0.0.1should you choose to try this approach.The
forward-zonesdirective lets you specify which servers to contact for which zones:It does look a little strange, since it is one configuration setting that takes multiple values, but you do get to specify exactly which servers are going to provide answers for which domains.