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 (Google)
    Who is build.company.de -> ask (internal server)

Concrete example 2:

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

2 Answers 2


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, while resolving everything else the normal way.

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

  • Thanks, I could do that locally. However, a simpler solution is appreciated :)
    – C-Otto
    Jan 13, 2014 at 10:09
  • The other solution would be to have your external DNS servers for your domain also resolve the internal domains. This would probably be a bit tricky, too.
    – Jenny D
    Jan 13, 2014 at 10:18

I have made a DNS server where this is easy to set up, as documented here:


The configuration would look something like this in Deadwood:

bind_address = ","
recursive_acl = ","
chroot_dir = "/etc/maradns"
root_servers = {}
root_servers["."]+=",,,, "
root_servers["."]+=",,,, "
filter_rfc1918 = 0

bind_address: IP of internal DNS server

recursive_acl: IPs allowed to use recursive DNS server

chroot_dir: Where the server is run

root_servers["."]: ICANN root name servers

root_servers["company.de."] = ""

IP of server that resolves anything that ends with "company.de."

filter_rfc1918 = 0: Allow names with IPs like to resolve

This can also be setup to, say, usually use Google's name servers:

bind_address = ","
recursive_acl = ","
chroot_dir = "/etc/maradns"
upstream_servers = {}
filter_rfc1918 = 0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .