Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers

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.

share|improve this answer
add comment
up vote 3 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.

share|improve this answer
2  
FYI: This would be blown away by any GUI edits. –  Chealion Jul 4 '10 at 15:37
add comment

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
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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