Search code examples
macosdnsosx-server

OS X Server DNS management


I have an OS X 10.6 Server running, which has PHP, Apache, MySQL, and DNS running on it. I want to take the DNS management out of the Server Admin App. I know that the DNS configuration files (the ones BIND uses) are plain text files (which have to obey some rules, obviously).

The main reason for this is because I wanted to setup DKIM for one of my domains, and I had to add a TXT record to the subdomain pm._domainkey.example.com. Server Admin did not let me add that subdomain, because of the "invalid" underscore character.

I searched for web based DNS management tools (the ones that I would install on my server and would allow me to manage my DNS records), but I couldn't find any good ones. (There were a couple that I managed to install, but they didn't see the configuration that I already had setup in Server Admin). Now I'm looking into editing the config files directly, but I don't know where they're located.

This is a test / development server, so messing it up wouldn't be such a disaster. I know "I shouldn't do this", but I want to :).

Thanks for your help.


Solution

  • You don't need to stop using Server Admin to manage the DNS, just go behind its back to add the records it can't handle. This is possible because in OS X Server v10.6 each DNS zone's contents are actually stored as two separate files: /var/named/zones/db.zonename.zone.apple has all of the Server Admin-managed contents, and /var/named/db.zonename. has just a comment and an include directive to pull in the .zone.apple file. Because Server Admin only looks at & changes the .zone.apple file, you can add whatever resource records you want to the second file -- they'll be ignored by Server Admin but served by the DNS service.