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

1 Answer 1


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; };
  • 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, 2011 at 11:28
  • it's not a valid answer, but thanks for answering :-)
    – JMW
    Nov 9, 2011 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. Nov 12, 2011 at 15:05
  • added the clarification
    – JMW
    Nov 29, 2011 at 11:16
  • I’ve updated the answer. Thanks, your question is much clearer now. :-) Dec 2, 2011 at 1:33

You must log in to answer this question.

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