Craig Francis


Debugging BIND Setup

Taking that you have done all of the setup above, and it does not appear to be working... you should start by checking that the 'named' service is running on the box. You can do this in the terminal by running:

ps ax | grep named

One of the lines in the output should contain:

/usr/sbin/named -f -c /.../main.conf

If not, then the DNS service is not running... either start it manually, or check your startup script.

If the service is still not running (ps ax), then its quite likely to be a config error. Please check for errors in:

/Library/Logs/named.log

This log file should show you about errors in the config, which is usually due to a missing semicolon (;) that breaks it.

Alternatively, you can check the 'named' configuration by running:

sudo named -g -d 3 -c /.../main.conf

This will put 'named' in the foreground, where it will print out the messages into the terminal, at debugging level 3, using the config file you have just created... just press [ctrl]+[c] to end the process.

Taking that 'named' is now running (ps ax), you can check the setup by running:

dig host.domain.com @127.0.0.1

It should come back with a response, where the 'ANSWER SECTION' contains your IP address.

If not, then check over your config files.

Taking that it all of this works, you should either check that you have setup your /etc/resolver/domain.com file correctly with:

scutil --dns
ping host.domain.com

Noting that dig won't use this resolver.

Or you should check to see if your using your new DNS server by default... to do this, just simply run:

dig host.domain.com

This should produce the same output as the last dig... if not, then check your "System Preferences > Network > Interface > Advanced > DNS"

Any feedback would be greatly appreciated, I don't include comments due to the admin time required, but if you email me, I will reply and make appropriate updates. Also, if you would like to take a copy of this article, please read the terms this article is released under. This article was originally written Sunday 17th June 2007 and was updated on Friday 14th September 2007.