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?
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?
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.
/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.
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.
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