Setting up DNS on Mac OSX Server

Setting up the DNS service on Mac OSX is really simple. In short, it is using the Server Admin tool and clicking on the DNS selection. A summary of the steos required is as follows.

  1. Login to the system with the admin username and password
  2. Select the “Serveradmin” application in your “Applications” folder.
  3. Make sure that you have your server marked and available in the left plane. If not, select “Add Server” and include the relevant parameters
  4. Select the “DNS” entry and select “Settings” somewhere near the bottom
  5. Create a new zone and enter the following
    • zone name : The domain name you wish the DNS to be a part of
    • Server name : DNS hostname
    • Server IP : Local IP address of the DNS machine
  6. Select “Machines” and add the machine IP addresses and names into the table provided.
    • NOTE: if you have a large number of machines that you need to input into the DNS tables, there is a small “file” icon on the bottom right which you can drag and place in your desktop. This will be a plist file which you can then open by using “Texedit”.
    • Once you have “exported” the .plist file, you can edit the file by hand or via a script such that you can enter many compute nodes at a time. Doing so will be faster for a large cluster of nodes.
    • You can re-import this by dragging the plist file back into the DNS settings window
    • NOTE2: if you want to do a zone transfer or zone forwarding, you need to add entries into the “Secondary Zone” for the queries to be forwarded.
  7. Start the DNS service by selecting start on the top bar
  8. Start the terminal application and ensure that your network interface is activated and up. (use ifconfig or something)
  9. Use “host” or “nslookup” to check for both forward and reverse name resolutions

One thing to note.. unlike linux where you can set up DNS without having a network connection, in MAC, you seem to actually NEED to have a wire connected, so that the interface is brought up, BEFORE you can test the DNS. So ensure that you actually have a physical ethernet connection before you test the DNS.