Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

on my intranet dns server, want to override some addresses.

So basicially, it should forward all resolving requests for the zone mydomain.tld, that are not in the "/etc/named/mydoamin.tld" file to the real DNS servers...

zone "mydomain.tld" IN {
    type master;
    file "/etc/named/mydomain.tld";
    forwarders {;;; };
    forward only;

how can this be done?


In the file "/etc/named/mydomain.tld" there are - for example - a cupple of records:

abc.mydomain.tld.      IN    A
def.mydomain.tld.      IN    A
ghi.mydomain.tld.      IN    A
jkl.mydomain.tld.      IN    A

and - for example - this records are (not in the file "/etc/named/mydomain.tld" but) in the offical nameservers:

abc.mydomain.tld.      IN    A
www.mydomain.tld.      IN    A
mail.mydomain.tld.     IN    A

so when a client in the intranet asks the intranet nameserver, the namesever should first look at his definitions and then in the case the entry is NOT sepcified, he should ask the official nameservers.

if the client asks for abc.mydomain.tld. the intranet nameserver should return

and if the client asks for www.mydomain.tld. the intranet nameserver should return

share|improve this question
up vote 4 down vote accepted

You cannot do this. Each DNS server must either contain a complete copy of the DNS zone, or have the entire DNS zone forwarded to the other server. You cannot have bits and pieces on different servers (unless you create sub-zones and delegate using NS records, but I digress).

So either make your internet and intranet servers the same, or forward one to the other like so:

zone "mydomain.tld" IN {
    type forward;
    forwarders { your-other-server-here; };
share|improve this answer
i do not want to use forwarders for all domains. just for the mydomain.tld in case the requested name is not in the file. – JMW Nov 9 '11 at 11:28
it's not a valid answer, but thanks for answering :-) – JMW Nov 9 '11 at 14:09
In which case your original question was not clear enough. I notice you have further clarified your question -- the answer is simple: you can't. I will edit my answer. – Jeremy Visser Nov 12 '11 at 15:05
added the clarification – JMW Nov 29 '11 at 11:16
I’ve updated the answer. Thanks, your question is much clearer now. :-) – Jeremy Visser Dec 2 '11 at 1:33

Your Answer


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.