DNS: Internal and External Name Servers

So, on the third day ...

I am running an Ubuntu.64 based distro on VirtualBox. I need to be able to access both external ISP DNS servers and "internal" DNS servers through an OpenVPN connection. Sometimes I need to query external DNS (#host example.com) via eth0 interface ; sometimes I need to query the "internal" DNS VPN (#host internal.local) over the tap0 interface .

My question is, how do I configure my system to query the correct nameserver - DNS provider or DNS VPN (for example, to attempt zone transfers)?

I've tried editing resolv.conf to include both external and internal nameservers / domains, with no luck (obviously). I also tried to mitigate the situation with dnsmasq. It shut me down (I think).

I understand that I can use dig to install [@server] based on individual requests, but I would appreciate a system permission.

Any help would be appreciated.

+3


source to share


1 answer


I've used PowerDNS recursor for this situation before; it's in the package pdns-recursor

if you want to try it. You only want yours to /etc/resolv.conf

query 127.0.0.1

if you decide to try this approach.

The directive forward-zones

allows you to specify which servers should contact in which zones:



forward-zones= ds9a.nl=213.244.168.210, powerdns.com=127.0.0.1

      

This looks a little odd as it is one configuration parameter that accepts multiple values, but you control exactly which servers will provide responses for which domains.

+3


source







All Articles