Starting BIND In OS X (Even After Reboot)

Posted on in System Administration

This information is really geared for pre-Tiger versions of OS X. In OS X 10.4 (Tiger), the BIND daemon is controlled by launchd and is pre-configured (although disabled). BIND Startup in Mac OS X 10.4 (Tiger) has more detailed information. Although outdated, this article still includes useful information.

Now that we've cleaned up the configuration files for BIND on our Mac OS X ~~10.4 (Tiger)~~ system, it's time to start it up. If we execute our BIND Startup Item, everything will work perfectly. As always, the '\$' represents the shell prompt and should not be typed.

$ sudo /System/Library/StartupItems/BIND/BIND
Starting BIND DNS Server

Unfortunately, that's pretty anti-climatic. We can see that named is in the process list:

$ ps ax | grep named
 1384  ??  Ss     0:00.01 /usr/sbin/named

And finally, we can run a query against our running name server and get a response back.

$ host slaptijack.com 127.0.0.1
Using domain server:
Name: 127.0.0.1
Address: 127.0.0.1#53
Aliases:

slaptijack.com has address 72.26.156.114
slaptijack.com mail is handled by 10 mail.slaptijack.com.

The first time you query the BIND server, the response will be a bit slow. BIND has to go out and query the appropriate name servers to find the address for you. After the first time, responses for that same lookup should be very quick. This is the real benefit of the caching-only name server.

Related Reading:

My Bookshelf

Reading Now

Other Stuff