If one has an own domain name, for instance,
First, on Linux host, type
Second, in
Now, we can add the following lines to
When the DNS service is running on the Linux host, it is time to configure the Mac client. It is easier to set up a preference pane from DNS-SD. On that preference pane, enter the desired fully qualified domain name, for instance,
example.com
, and a Debian GNU/Linux host with a static IP address, for instance, 1.2.3.4
, plus both primary and secondary name servers pointing to the host itself, it is possible to configure Bonjour dynamic global hostname feature on Mac OS X client. The following steps explain the procedure.First, on Linux host, type
sudo apt-get install bind9
. Then, generate a secret shared key configuration by typing sudo rndc-confgen -r /dev/urandom -a -c /etc/bind/bonjour.key -k example.com.
and setting the owner of the file to the bind
user by sudo chown bind:bind /etc/bind/bonjour.key
.Second, in
/var/cache/bind
directory, create a zone file named example.com.db
and owned by bind
user with the following contents:$ORIGIN . $TTL 120 ; 2 minutes example.com IN SOA ns1.example.com. info.example.com. ( 2007011542 ; serial 7200 ; refresh (2 hours) 120 ; retry (2 minutes) 2419200 ; expire (4 weeks) 604800 ; minimum (1 week) ) NS ns1.example.com. NS ns2.example.com. A 1.2.3.4 MX 10 mail.example.com. $ORIGIN _dns-sd._udp.example.com. $TTL 120 ; 2 minutes b PTR example.com. lb PTR example.com. r PTR example.com. $ORIGIN _udp.example.com. _dns-update SRV 0 0 53 ns1.example.com. $ORIGIN example.com. mail A 1.2.3.4 ns1 A 1.2.3.4 ns2 A 1.2.3.4
Now, we can add the following lines to
/etc/bind/named.conf.local
file and restart the service by typing /etc/init.d/bind9 restart
:include "/etc/bind/bonjour.key"; zone "example.com" { type master; file "example.com.db"; allow-update { key example.com.; }; };
When the DNS service is running on the Linux host, it is time to configure the Mac client. It is easier to set up a preference pane from DNS-SD. On that preference pane, enter the desired fully qualified domain name, for instance,
mac.example.com
as well as the password which is basically the shared key from /etc/bind/bonjour.key
file on the Linux host. The right hand side dot turning green indicates successful configuration, that is, the chosen hostname is now pointing to the Mac client.