Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a RHEL5 box running bind9 as an intranet dns server for our office. I'm having trouble formulating the question. Please bear with me.

Assume my domain is and the dns records for are managed by my hosting provider. I would like to set up an intranet server: , only visible on the intranet.

from the internal network:

dig @intranetdns

should return the server IP address from the hosting provider (e.g. and

dig @intranetdns

should return the dev server's local ip address (e.g. from the local dns

I would like to be able to say "this hostname resolves to this IP address, go to the external DNS for everything else" I'm not a bind guru, though I have worked with it a bit and set up views etc.

How can I do this, is this possible?

share|improve this question

1 Answer 1

For your specific example, you'd just create an A record for pointing at the external IP, and an A record for pointing at the internal address.


@     IN   A
dev   IN   A

You could also add the external DNS server as a forwarder in named.conf.

share|improve this answer
Thats what I thought, but when I add the A record for to the intranet DNS, then I cannot resolve or any other subdomains. Even though I have the forwarder set, bind doesn't seem to forward the request for to the internet DNS server once I add a zone and A record for to the intranet DNS server. – Chris E. Mar 28 '13 at 18:46
My bad. Once you create the zone for on the intranet server, it won't forward requests for – mazianni Mar 28 '13 at 19:23
Yes, this is what I'm trying to figure out. I can't have an A record without a zone, and once I make the zone I can't resolve internet addresses. What would be the workaround? – Chris E. Mar 28 '13 at 19:34
Add the Internet address as an A record in the zone you created. – mazianni Mar 28 '13 at 19:36
I see that is the solution, but we have a large number of subdomains. The problem is that I don't want to have to manage the domains and subdomains in two places, both externally and locally. It seems odd that this functionality doesn't exist? – Chris E. Mar 28 '13 at 19:42

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.