You have just installed Mountain Lion Server, now what!? Going on the assumption you are staring at Server.app right after a clean install, the first thing that needs attention is DNS!
There is no faster way to make things difficult for OS X (and OS X Server) than to have bad DNS information. This has been true since the beginning of OS X so hopefully this doesn’t come as a surprise. However, what is new with Mt Lion is that we get to configure DNS via the newly updated Server.app.
Your window of Server.app may vary from the images below, but in the end we should have somewhat the same settings. First thing is to make sure that you have Server.app up and running. Yes, you read that correctly… Server.app. At first you might fight this, but most of the features of running a DNS server are available, plus some added love for IPv6!
When we look at a newly installed Server that didn’t have any DNS information to verify the server will automatically configure DNS for itself and start the DNS service. You first want to apply some “Forwarding Servers” so you machine (and any client/server using this as the primary DNS server) can find information outside your network. Some common Forwarding server are:
These are the same settings that you would have performed in Server Admin => DNS => Settings, but what took you a couple of clicks to get to the configuration pages is now displayed on page one in Server.app; Improvement!
By default the server will provide DNS information to clients within the same subnet as the server is running AND itself. These are the same defaults that come in Server Admin (f.k.a localhost and localnets). You can always add additional network segments if needed, just like you could before.
Finally we get to add some records!
First of all, just like previous version of OS X if you let the server automatically configure DNS for you during installation, the DNS settings are slightly off. It only creates a zone for the server’s FQDN vs. specifically the domain (which is what you want in the first place). This can be seen by clicking on the gear icon and choosing “Show All Records”.
At the very top in gray you should see “Primary Zone: FQDN” (with FQDN being the server’s full DNS name). During the Server Assistant setup process, the server could not verify the provided IP address and hostname, thus to protect itself it created these DNS records, however, they are not correct for hosting DNS information for other clients. So how do we fix this? Disable the “Show All Records”, select your server FQDN, and click on the minus button. Select Delete on the warning screen that is displayed when trying to delete a record. Now click on the plus button and re-add your server’s FQDN and IP address. This time, it will make your zone file as the domain name vs. the FQDN of the server name.
To add additional DNS entries, continue adding names via the plus sign button. If there are machines that need Aliases (or more commonly known as CNAME), you can add just the alias host name vs. the FQDN. In addition you can also mark specific servers for mail by checking the MX checkbox at the bottom. Lastly, you’ll notice that the new DNS window will allow multiple IP address for one DNS record. This can be done for load balancing purposes OR we can also add IPv6 addresses!
To find your IPv6 Address, you can open System Preferences => Network => Advance and choose “Link-local only” in the Configure IPv6 drop-down option, or:
Copy/paste the result as a second IP address for the desired DNS record. Once you are done, you should be able to see all your DNS records in black text and just below all associated IP addresses (IPv4 and IPv6) along with any aliases.
The RAW DNS text files (which are provided by the open source tool BIND) are in /private/var/named, and you are able to see the following DNS records (or at least something similar as your setup may differ from mine):
A quick export of my db.example.prv shows the following information:
The one thing that I notice that I cannot do is create a SLAVE DNS server. My only guess is Apple assumes if you are redundancy focused environment then you are using something other than OS X server. Not to say this is not possible as you would simply have to modify the /etc/named.conf file and list the zone type as “slave” vs. “master”, there is just no GUI method to do this.