I have managed to populate my /etc/resolv.conf with several nameservers when I bring up my VPN. The nameservers have two zones of operation, internal (through the VPN) and public (Exposed). Some of the entries exist in both zones, but these point to different IP's, some only exists on the internal zone

Whenever I try to resolve some entry it defaults to the internal zone, which is a desired behavior, but, whenever I try to resolve an entry which does not exist on the internal zone I would like it to fetch the next available nameserver and query the same entry, basically if one nameserver does not know the answer ask the next one, if none have the answer then fail.

Is this possible to setup using resolv.conf?

  • What you want is the default behaviour of DNS, just by adding those nameservers to /etc/resolv.conf. Are you able to ping all of the nameservers listed? Can you query them with nslookup? – Gerard H. Pille Jan 12 '18 at 14:41
  • adding nameservers to resolv conf does not improve things, and much less nameservers with different views. It just makes things more erratic. – Rui F Ribeiro Jan 12 '18 at 16:28
  • resolv.conf lists recursive nameservers, not authoritative ones. If you need a more complicated setup, like querying only some specific namesevers for specific zones, you can locally install a software like unbound – Patrick Mevzek Jan 17 '18 at 4:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.