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 bob.com and the dns records for bob.com are managed by my hosting provider. I would like to set up an intranet server: dev.bob.com , only visible on the intranet.

from the internal network:

dig bob.com @intranetdns

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

dig dev.bob.com @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?

1 Answer 1


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

$ORIGIN bob.com.

@     IN   A
dev   IN   A

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

  • Thats what I thought, but when I add the A record for dev.bob.com to the intranet DNS, then I cannot resolve bob.com or any other subdomains. Even though I have the forwarder set, bind doesn't seem to forward the request for bob.com to the internet DNS server once I add a zone and A record for dev.bob.com to the intranet DNS server.
    – Chris E.
    Mar 28, 2013 at 18:46
  • My bad. Once you create the zone for bob.com on the intranet server, it won't forward requests for bob.com.
    – mazianni
    Mar 28, 2013 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, 2013 at 19:34
  • Add the Internet address as an A record in the zone you created.
    – mazianni
    Mar 28, 2013 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, 2013 at 19:42

You must log in to answer this question.

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