Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

(See bottom for what I think might be the solution.)

I want to configure bind on our caching dns to resolve bla.mydomain.com to (an internal host) while still forwarding all other requests to our internet provider's name servers. This should only work from our intranet, the box is not meant for external access.

I got the first part working by creating a master zone for mydomain.com and adding an address entry for bla:


$ttl 38400
mydomain.com. IN      SOA     dns. webmaster.mydomain.com. (
                        38400 )
mydomain.com. IN      NS      s6.
bla.mydomain.com.      IN      A

But of course now nobody in our intranet can find our webserver www.mydomain.com any more.

If I remove this master zone again, everything goes back to normal, that is bind only caches and forwards dns lookups.

I already tried Google but either I did not find the correct key words or this problem is so rare that nobody writes about it (which I just can't believe).

Any hints?


I tried adding a master zone for bla.mydomain.com as voretaq7 suggested:


$ttl 38400
bla.mydomain.com.   IN  SOA dns. webmaster.mydomain.com. (
        38400 )
bla.mydomain.com.   IN  A

and restarted bind, just to be sure.

Now, nslookup kind of works:

Default Server:  localhost

> bla.mydomain.com
Server:  localhost

Name:    bla.mydomain.com

(Why does it say "Default Server: localhost", that's not the ip of my local box but the ip of the name server.)

But a ping bla.mydomain.com still returns the ip address from my internet provider's dns.


Based on an answer to this question I think dnsmasq is what I am looking for. I'll give it a try.

share|improve this question

1 Answer 1

Create a zone for the specific host you want to resolve (bla.mydomain.com), containing only that host and any subdomains under it (foo.bla.mydomain.com, etc.).

share|improve this answer

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.