I've been following the official documentation for DNS-SD on setting up a Bonjour name server. That is, a wide-area DNS server. The instructions seem quite old, given some of the things it refers to no longer exist (like dnsextd
on macOS, which seems to be incorporated into bind9 in any case).
I'm actually setting up this DNS server on a Linux installation (Raspbian), which should be possible according to that page.
You can also use Linux, Solaris, or any other Unix-style operating system that can run the BIND name server.
Here are my relevant configuration files on the server system.
/etc/bind/named.conf.options
options {
directory "/var/cache/bind";
forwarders {
192.168.0.1;
fdd4:12f8:9ad3:0:8272:15ff:fe97:6678;
};
dnssec-lookaside auto;
listen-on-v6 { any; };
}
/etc/bind/named.conf.local
zone "lan." IN {
type master;
file "lan.zone";
};
zone "bonjour.lan." IN {
type master;
file "bonjour.lan.zone";
allow-update { any; };
};
/var/cache/bind/lan.zone
@ IN SOA rpi.lan. hostmaster.lan. (
1 ; serial
8H ; refresh
4H ; retry
4W ; expire
1D ; minimum
)
@ IN NS rpi.lan.
@ IN MX 10 rpi.lan.
localhost IN A 127.0.0.1
router IN A 192.168.0.1
rpi IN A 192.168.0.10
/var/cache/bind/bonjour.lan.zone
@ IN SOA rpi.lan. hostmaster.lan. (
1 ; serial
3H ; refresh
1H ; retry
1W ; expire
1M ; minimum
)
@ IN NS rpi.lan.
_dns-update._udp IN SRV 0 0 53 rpi.lan.
b._dns-sd._udp IN PTR @
lb._dns-sd._udp IN PTR @
r._dns-sd._udp IN PTR @
However, this set-up is failing to pick up any devices advertised on the network via Bonjour. This can be seen by running dig bonjour.lan
.
; <<>> DiG 9.18.12 <<>> bonjour.lan
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41841
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: ebefdba02287f4bb7687ffc663fa9167695632eedfc0a265 (good)
;; QUESTION SECTION:
;bonjour.lan. IN A
;; AUTHORITY SECTION:
bonjour.lan. 60 IN SOA rpi.lan. hostmaster.lan. 3 10800 3600 604800 60
;; Query time: 79 msec
;; SERVER: 192.168.0.10#53(192.168.0.10) (UDP)
;; WHEN: Sat Feb 25 22:53:27 GMT 2023
;; MSG SIZE rcvd: 129
Any advice on how to get this working would be much appreciated.