Using a Local DNS Server in Leopard

Posted on in System Administration

Most of OS X Caching Only Name Server series was written in the pre-Leopard days. The final step in that process was to make the new server the preferred DNS server. Unfortunately, a change was introduced in Leopard that only allows you to add the local server to the list of servers specified by the DHCP server. The DHCP specified servers are shown in the list and grayed out. I found the solution to this problem in a post by John M. Simpson about setting up djbdns on Mac OS X.

The key to fixing this problem is in the /System/Library/SystemConfiguration/IPConfiguration.bundle/Contents/Resources/IPConfiguration.xml file. In this file, you'll find the following array:

<key>DHCPRequestedParameterList</key>
<array>
  <integer>1</integer>
  <integer>3</integer>
  <integer>6</integer>
  <integer>15</integer>
  <integer>119</integer>
  <integer>95</integer>
  <integer>252</integer>
  <integer>44</integer>
  <integer>46</integer>
  <integer>47</integer>
</array>

The key to this tip is to remove the 6, 15, and 119 entries. Once you've done that, the array should look like this:

<key>DHCPRequestedParameterList</key>
<array>
  <integer>1</integer>
  <integer>3</integer>
  <integer>95</integer>
  <integer>252</integer>
  <integer>44</integer>
  <integer>46</integer>
  <integer>47</integer>
</array>

All that's left is to save the file and reboot.

Slaptijack's Koding Kraken