Domanda

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.

È stato utile?

Soluzione

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.

Altri suggerimenti

I'm not sure if Apple has changed these in modern versions of OSX Server, but in my old 10.5.8 server, the starting point for BIND configuration is the file /etc/named.conf.

From this file, you can see lines like include "/etc/dns/options.conf.apple"; which tell you that you may find additional stuff in the /etc/dns/ directory.

I don't have any DNS configured on my OSX Server 1.5.8 machine, but I suspect that just about anything you do will need to be included from /etc/named.conf, or included from something that it includes.

MAKE SURE you don't try to modify your configuration using the GUI tools, once you start editing the text files directly.

You might also want to look into a version control system like subversion or git (or heck, even RCS) to keep track of updates that you make. It'll make it easier to see your history, track down errors, as well as recover from accidental GUI configuration overwrites!

One other thing. While OSX's configuration tool might not let you put an underscore into a hostname, perhaps it'll let you put it into a subdomain? I haven't tried, but you might want to just see if it'll allow you to set up a new domain of _domainkey.example.com, under which you'll have hosts like pm. The routines that validate hostnames may be different from the ones that validate subdomains. I have no idea if this'll work, but it's worth experimenting with.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top