This article is a pre-release chapter in the upcoming “Take Control of OS X Server,” by Charles Edge, scheduled for public release later in 2014. Apart from, and , these chapters are available only to ; see  for details.
Now that you’ve configured your server and set up Open Directory, we can move on to configuring other services. The first we’ll look at is DNS, or Domain Name System, which is a system for naming computers, resources, and services. If you’ve been following along in this book, you’ve already turned on the DNS service in order to enable Open Directory. Now, it’s time to improve and extend your DNS configuration.
Although DNS configuration beyond what you already did in
192.168.210.2. And, to make it even easier, you can even associate names with certain services, like file sharing, since it’s easier to remember that the internal file server is called
mavserver.pretendco.lan (even if they’re just two names for the same server).
Another benefit of using names rather than IP addresses is that if you move certain services to other servers in the future, you can just, for instance, repoint
files.pretendco.lan at a different machine, and your users don’t have to change anything to access your file server.
Finally, if you have multiple servers, running DNS internally becomes increasingly important for distinguishing between the servers.
The order in which you set up services and their associated DNS names isn’t important; you obviously can’t use a DNS name until you’ve set it up, but every server and service is accessible via its IP address until then. It’s easiest to create DNS names for the various services you anticipate enabling now, but if you forget one, just come back and set it up later.
Before I get into how to configure DNS, let’s take a step back and make sure you understand what sort of DNS records you can work with in OS X Server. For basic usage, many of these will be created for you or aren’t necessary, but you will likely want to create machine, alias, and mail exchanger records, depending on the internal services you set up.
Each domain name you create is known as a zone. Each item that you want to point somewhere is known as a record. You can see and create the following in Server’s DNS screens:
www.pretendco.lanwould have a primary zone of
pretendco.lan. The primary zone is created for you when you create your first machine record.
mavserver.pretendco.lan, you might want to define alias records for
www.pretendco.lan, pointing both of them back at
mavserver.pretendco.lan. There’s nothing special about these aliases—you can make them whatever you want (as long as they’re short, and use only letters, digits, and hyphens), with the primary goal being to make them sensible for your users.
As I noted at the start of this chapter, there are two main reasons to run a DNS server in a small home or office network, caching and mapping names to IP addresses. The good news is that there’s absolutely nothing to do to take advantage of Server’s DNS caching capabilities—it automatically caches every request and serves the cached information on subsequent requests if the information hasn’t aged out.
Setting up additional records to map names to IP addresses is a bit more work, but not much. First you’ll create alias records to the machine record you created in and a mail exchanger record in Server, and then you’ll need to adjust the DNS settings on client Macs so they know about your new DNS names.
Follow these steps to create your alias records, as well a mail exchanger record. For the purposes of this example, we’ll create alias records for file and Web servers:
files, and in the Destination field, enter the name of your server, such as
mavserver.pretendco.lan(Figure 1). Click Create.
wwwin the Host Name field this time.
mail.pretendco.lan(Figure 2). Leave the Priority field at 0—if you had multiple mail servers, higher numbers in this field would cause them to be used at lower priorities. Click Create.
The simplest way to configure the client Macs on your network to use your new DNS server is to reconfigure your DHCP server (often your DSL or cable modem, or an AirPort base station or similar router) to provide the new server as the first DNS entry, as I’ve shown in Figure 4. It’s safest to enter another DNS server—either one run by your ISP or a major public one like Google’s 126.96.36.199—in the second DNS Servers field, since that will be used as a backup for DNS lookups if your local DNS server were to go down for some reason.
If you cannot access the DHCP server for your network, you can always assign the DNS server manually on each client Mac:
If all has gone well, you’re now running a DNS server for your network, and all the client Macs on the network are using that DNS server to look up IP addresses for both internal and external machines.
Read More: Chapter 12 |  |  |  |  |  |  |  |  |  |  |  |  |  |