Is it possible (and if so, how) to set up a DNS server that would behave like this: 1. Try to resolve DNS query through DNS1 server (given by IP). If domain exists, return to client. If domain does not exist continue. 2. Try to resolve DNS query through DNS2 server (given by IP). Whether domain exists or not return result to client.

It might be good enough if the distinction which server to contact is done based on domain name to be resolved. Eg. *.abc.com and *.bcd.com are resolved using DNS1 and rest is resolved using DNS2. However the preferred way would be to always try DNS1 first and then DNS2 if DNS1 doesn't know about the domain.

As an additional feature it would be good to be able to change all responses from DNS2 that fall into private IP range (e. to point to different IP address range (e. This is because the two networks have some conflicting IP ranges.

This can be done on both Windows 10 or Ubuntu Linux (I have no particular preference here), but other than OS license should be free.

  • Do you control DNS1 and DNS2? Or are they owned by a 3rd party?
    – eKKiM
    Apr 6, 2018 at 9:19
  • They are controlled by third party. Apr 9, 2018 at 10:01
  • In this cqse you will need to set up your own DNS server. I have editted my answer accordingly.
    – eKKiM
    Apr 9, 2018 at 10:11

1 Answer 1


Since you have no control over DNS1 and DNS2 you need to setup your own DNS server.

On this DNS server you can specify forwards to DNS 1 and DNS 2.

Specify DNS forwards

These settings needs to be defined at DNS server level. You can specify forwards here.

Make sure all clients point to DNS1 and configure forwarders in DNS1


  1. Open DNS Manager MMC
  2. Right-click your DNS Server and choose Properties
  3. Navigate to the Forwards tab
  4. Click Edit... and fill in the IP of DNS2


Edit your bind configuration. Add the forwards in your options {...}

forwarders {; # Replace with DNS2 IP
    dnssec-validation no; # Optional
  • I understand this means I would need to gave control over DNS1 - which I don't have. Apr 9, 2018 at 10:06
  • You need to set up your own DNS ("DNS3").
    – bjoster
    Apr 10, 2018 at 11:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.