How do I run BIND 9 on Apple macOS?

Prev Next

If you run macOS then this is all you need to do.
First, change to BIND's working directory, then:

% sudo rndc-confgen  > rndc.conf

Copy the key statement from rndc.conf into rndc.key, e.g.:

key "rndc-key" {
   algorithm hmac-md5;
   secret "uvceheVuqf17ZwIcTydddw==";
};

Then start the service:

% sudo service org.isc.named start

This is persistent upon a reboot, so you will have to do it only once.

Alternatively you can just generate rndc.key by running:

% sudo rndc-confgen -a

then starting the service:

% sudo service org.isc.named start

named will look for rndc.key when it starts if it doesn't have a controls section or the existing controls are missing keys sub-clauses. This is persistent upon a reboot, so you will have to do it only once.