Combining different DNS servers

dns

My company uses DNS servers that provide access to internal systems, for example "build.company.de" is resolved accordingly if one of the internal DNS server is queried. However, the internal servers are very slow. I'd love to use, for example, Google's DNS servers instead for non-internal queries.

How can I configure to use Google's DNS servers all of the time, except when the host does not exist? Alternatively, It would be nice to specifiy that all queries for the domain "company.de" should be resolved by the internal servers instead.

The current behaviour is that non-existing / internal hosts are not resolved, because my system sends to query to Google's servers.

Concrete example 1:

    Who is heise.de? -> ask 8.8.8.8 (Google)
    Who is build.company.de -> ask 10.1.1.1 (internal server)

Concrete example 2:

    Who is heise.de? -> ask 8.8.8.8 (Google)
    Who is build.company.de -> ask 8.8.8.8 (Google) -> upon failure ask 
10.1.1.1 (internal server)

Best Answer

Setup a separate server to act as a resolver. I'd recommend any unix running bind. Then have that server forward internal domains only to 10.1.1.1, while resolving everything else the normal way.

There are instructions on how to make bind do that at this question.

Related Question