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

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:

  1. I edited /etc/named.conf and created the appropriate zone files.
  2. I tried to restart bind9 with a service bind9 restart.
  3. 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/)

share|improve this question
    
Are there any configuration files in /etc/named/? –  Ladadadada Jun 21 '12 at 5:47
    
There's no such directory. So the answer is no. I /did/ create a directory called /var/named/ as root and then referenced that path in the options of the named.conf file, but that didn't help. –  Avery Chan Jun 21 '12 at 5:57
1  
Aren't you supposed to use /etc/bind on ubuntu?.. –  pauska Jun 21 '12 at 5:58
    
Maybe you installed named with chroot and configs are in /var/named/chroot/etc –  B14D3 Jun 21 '12 at 5:58
    
@pauska Quite possibly but where's the documentation for that? That's the frustrating part because I do a man named and there's nothing there about using /etc/bind. –  Avery Chan Jun 21 '12 at 6:01

2 Answers 2

up vote 1 down vote accepted

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 (with service bind9 start) it again?

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

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.