The GUI does not accept "*". How, through the GUI, do I create a wildcard subdomain?

OR

Where is the Bind installation in the OSX 10.6 Server filesystem?

link|improve this question

feedback

4 Answers

up vote 1 down vote accepted

The local for the DNS zone details is:
cd /var/named/zones/

To add the wildcard
sudo vi db.example.org.zone.apple

Then
example.org. IN NS ns.example.com.
* IN A 192.168.1.10
www IN A 192.168.1.10

Add the "* IN A 192.168.1.10" to the zone.apple file.

link|improve this answer
1  
FYI: This would be blown away by any GUI edits. – Chealion Jul 4 '10 at 15:37
feedback

With Mac OS X 10.6 Apple has made it much easier to avoid blowing away your DNS edits from the command line:

In /var/named/ you'll see a list of your zones in the format db.domain.tld. by default they will only contain the text:

;THE FOLLOWING INCLUDE WAS ADDED BY SERVER ADMIN. PLEASE DO NOT REMOVE.
$INCLUDE /var/named/zones/db.DOMAIN.TLD.zone.apple

The *.zone.apple file is updated and managed by Server Admin, so any changes made there by hand will be blown away by any GUI changes. What you want to do is make your changes to this file, so add your wildcard to this file instead. Example:

;THE FOLLOWING INCLUDE WAS ADDED BY SERVER ADMIN. PLEASE DO NOT REMOVE.
$INCLUDE /var/named/zones/db.DOMAIN.TLD.zone.apple
*.domain.TLD IN A 192.168.1.10
link|improve this answer
feedback

UPDATE for 10.7

The following worked for me:

  • I had already created a bunch of subdomains for my domain hereby referred to as DOMAIN.TLD So before I started /var/named/db.DOMAIN.TLD looked something like this:

    DOMIAN.TLD.                  10800 IN SOA      DOMAIN.TLD. amiel.DOMAIN.TLD. (
                                                    2012012509 ; serial
                                                    20864      ; refresh (5 hours 47 minutes 44 seconds)
                                                    3600       ; retry (1 hour)
                                                    14976      ; expire (4 hours 9 minutes 36 seconds)
                                                    10800      ; minimum (3 hours)
                                                    )
                                 10800 IN NS       dns.DOMAIN.TLD.
                                 10800 IN A        192.168.1.117
    db.DOMAIN.TLD.               10800 IN A        192.168.1.117
    dns.DOMAIN.TLD.              10800 IN A        192.168.1.117
    ... etc ...
    
  • First, I quit Server Admin (just to make sure it didn't have this files contents in memory or something)

  • I added one line to the end with * for the wildcard:

    *.DOMAIN.TLD.                10800 IN A        192.168.1.117
    
  • Then I started Server Admin back up and found that the wildcard record was there.

  • I used Server Admin to "save" and "restart" DNS. and found that my wildcard domains were working just fine.

Observations

  • Server Admin shows the wildcard domain entry, and will let me edit the ip addresses for that entry, but will not let me edit the machine name.
  • After saving, Server Admin re-orders the entries in /var/named/db.DOMAIN; I noticed that the wildcard entry is now at the top. It still works as expected. This isn't a big deal, but does indicate to me that it's loading and saving it correctly, it's just the input processing that won't let you create a new record with "*".

I hope this helps someone.

link|improve this answer
feedback

Just a site note here. I'm not sure if this is an artefact because the OS X Server machine I'm working on has been upgraded from 10.4 incrementally to 10.7 (whew!), but on this 10.7 box, the zones directory seems to have been deprecated and they've gone back to basic unitary zone files.

My /var/named directory has only the standard db.domain.tld files and there are no $INCLUDE directives.

If someone with a clean install of OS X Server can confirm (or deny) this 10.7 regression that would be nice.

I created a new test domain to check the behaviour and it just created a new db file and did not create a zones directory.

link|improve this answer
I'm also seeing no zones directory or $INCLUDE directive on 10.7. I'm planning on editing my db.DOMAIN.TLD file, adding a wildcard subdomain, to see what the GUI does. – Amiel Martin Jan 25 at 23:42
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.