Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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)
share|improve this question

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer
    
Thanks, I could do that locally. However, a simpler solution is appreciated :) –  C-Otto Jan 13 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 at 10:18

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

http://maradns.samiam.org/deadwood/doc/Deadwood-HOWTO

The configuration would look something like this in Deadwood:

bind_address = "127.0.0.1, 192.168.1.42"
recursive_acl = "127.0.0.1/16, 192.168.1.1/24"
chroot_dir = "/etc/maradns"
root_servers = {}
root_servers["."]="198.41.0.4, 192.228.79.201, 192.33.4.12, 199.7.91.13,"
root_servers["."]+="192.203.230.10, 192.5.5.241, 192.112.36.4, 128.63.2.53, "
root_servers["."]+="192.36.148.17, 192.58.128.30, 193.0.14.129, 199.7.83.42, "
root_servers["."]+="202.12.27.33"
root_servers["company.de."]="192.168.1.111"
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."] = "192.168.1.111"

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

filter_rfc1918 = 0: Allow names with IPs like 192.168.0.123 to resolve

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

bind_address = "127.0.0.1, 192.168.1.42"
recursive_acl = "127.0.0.1/16, 192.168.1.1/24"
chroot_dir = "/etc/maradns"
upstream_servers = {}
upstream_servers["."]="8.8.8.8, 8.8.4.4"
upstream_servers["company.de."]="192.168.1.111"
filter_rfc1918 = 0
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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