I've been reading a bit on how to configure my own DNS server. I have a host of questions but this is the first that came up:
- I edited
/etc/named.conf
and created the appropriate zone files. - I tried to restart bind9 with a
service bind9 restart
. - A quick grep of syslog shows that it's not running with the changes I specified in
/etc/named.conf
.
How do I get /etc/named.conf
to be loaded?
(I gave up after a while and after looking at the output from named-checkconf -p
, I started editing files in /var/cache/bind
as well as /etc/bind/
)
Running
service bind9 restart
should work. For bind9 on Ubuntu v11.10, the default location for named.conf is/etc/bind/named.conf
not/etc/named.conf
.In general, the init script (
/etc/init.d/bind9
) should point you to where the configuration file resides.For bind9 on Ubuntu v11.10, there is a bind settings file at
/etc/default/bind9
but it is only used to set command line options when starting named - which shouldn't matter, unless someone edited this file to add an argument to redirect where named.conf resides.NOTE: I wouldn't move the configuration file away from its default location without good reason nor would I edit what is in
/var/named
directly (isn't this autocreated).Another thing to check is: have you tried
service bind9 stop
and then confirmed that named is no longer running and then started (withservice bind9 start
) it again?Yeah. I have noticed that the named man page is completely wrong on ubuntu 10.04 about the config file. It seems to actually be /etc/bind/named.conf rather than what the man page states (/etc/named.conf). I figured this out by reading the system log when bind9 starts and noticing that it was built with sysconfdir=/etc/bind
I hope someone notices the error and fixes in at some point.