PDA

View Full Version : Two-in-one DNS server with BIND9 - all zones must be in views


c4rdinal
2nd April 2008, 13:34
First of all thank you for the Howto!

I would like to ask something about my bind logs as follows:

tail -f /var/log/syslogd

Apr 3 02:54:27 deneb named[27976]: /etc/bind/named.conf:10: when using 'view' statements, all zones must be in views

What does it mean and how to resolve it?
I can ping external sites as well as internal but what does the log is about?

Also,

Linux:~# named-checkzone example.com db.example
zone example.com/IN: loading master file db.example: file not found

How can I fix it?

TIA

topdog
2nd April 2008, 13:41
The first error means that all your zones need to be in the view declaration

view "viewname" {


}

Second error means named cannot find your zone file

c4rdinal
3rd April 2008, 02:50
Hi!

Here's what I included in my /etc/bind/named.conf.local

view "internal" {
match-clients { internals; };
recursion yes;
zone "domain1.com" {
type master;
file "/etc/bind/zones/internal/db.domain1";
};
};

view "external" {
match-clients { any; };
recursion no;
zone "domain1.com" {
type master;
file "/etc/bind/zones/external/db.domain1";
allow-transfer { slaves; };

};
zone "domain2.com" {
type master;
file "/etc/bind/zones/external/db.domain2";
allow-transfer { slaves; };
};

I have 2 external domains and 1 internal. Should I include in the view my reverse zones?

Thanks alot.

topdog
3rd April 2008, 08:35
If you are using views all your zones should be within a view.