I use bind9 on debian for 2 purposes:

-> first to announce domain names over the Internet, this part works

-> secondly to resolve internal servers (I don't want to maintain /etc/hosts file), this part does not work. I don't want the internet to be aware of this part (they are my internal servers) I have split my configuration file into two views on /etc/bind9/named.conf.local

view "dmz" {

match-clients { "any"; };

zone "mydomain.net" {
    type master;
    allow-transfer { 213.186.33.199; };
    file "/etc/bind/zones/mydomain.net.hosts";
    notify yes;
};

zone "otherdomain.fr" {
    type master;
    allow-transfer { 213.186.33.199; };
    file "/etc/bind/zones/otherdomain.fr.hosts";
    notify yes;
};

};

view "trusted" {

    match-clients { 192.168.0.0/24; 127.0.0.1; };
recursion yes;

zone "goeland.lan" {
    type master;
    allow-transfer { none; };
    allow-query { 192.168.0.0/24; 127.0.0.1; };
    file "/etc/bind/zones/goeland.lan.hosts";
    notify no;
};

};

Here is goeland.lan.hosts:

$TTL 10800

@    IN    SOA      ns.goeland.lan. root (
2011181901          ;serial (version)
3600                    ;refresh period
900                 ;retry refresh this often
604800              ;expiration period
3600                    ;minimum TTL
); 

@ IN NS ns.goeland.lan.
ns    IN    A   127.0.0.1
proxy IN    A   192.168.0.104

The other *.hosts files follow the same pattern.

Whereas I can resolve my public domain over the Internet, I can't do the same inside my network for my private hosts. Ok, goeland.lan is a stupid domain name, but inside my network, I can choose whatever name i want, can't I?

Here is the output of host command:

host proxy Host proxy not found: 3(NXDOMAIN)

And the record in the log files

client 127.0.0.1#42766: view dmz: query: proxy.goeland.lan IN A + (127.0.0.1)
client 127.0.0.1#59122: view dmz: query: proxy IN A + (127.0.0.1)

They look like the same between working/no-working zones

Can anyone give me some piece of advice on how to configure resolution for internal hosts?

Many Thanks :)

link|improve this question

56% accept rate
You posted some great info but could you also check your logs after you restart named and verify that it is loading the zone: Aug 20 22:05:14 gw1 named[58921]: 20-Aug-2011 22:05:14.772 general: info: zone 0.f.ip6.arpa/IN: loaded serial 42 – polynomial Aug 21 '11 at 5:05
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.