[Dnsmasq-discuss] DNS based service discovery

Andreas Steinel A.Steinel+dnsmasq at googlemail.com
Mon Jul 26 19:15:14 BST 2010


Hi everybody,

I didn't find any examples of DNS-SD (http://dns-sd.org/ -
Zeroconf/Bonjour/Avahi based on DNS entries) provided by dnsmasq so I
started to figure it out by myself. Finally, I got it to work and want
to share my working configuration for everybody interested in this
topic. Maybe this will be included in the example configuration.

Analogously to a working copy of DNS-SD in other DNS implementations,
I got the following configuration using my domain 'steinel.home'
(installed on my FritzBox powered by dnsmasq):

--- snip ---
expand-hosts
domain=steinel.home
local=/steinel.home/

txt-record=steinel.home,"v=spf1 a -all"

# Default Base
ptr-record=r._dns-sd._udp.steinel.home,steinel.home
ptr-record=dr._dns-sd._udp.steinel.home,steinel.home
ptr-record=lb._dns-sd._udp.steinel.home,steinel.home
ptr-record=b._dns-sd._udp.steinel.home,steinel.home


# Services
ptr-record=_services._dns-sd._udp.steinel.home,_http._tcp.steinel.home
ptr-record=_services._dns-sd._udp.steinel.home,_ssh._tcp.steinel.home
ptr-record=_services._dns-sd._udp.steinel.home,_sftp-ssh._tcp.steinel.home


# HTTP Section
ptr-record=_http._tcp.steinel.home,fritzbox._http._tcp.steinel.home
ptr-record=_http._tcp.steinel.home,freetz._http._tcp.steinel.home

srv-host=fritzbox._http._tcp.steinel.home,internet.steinel.home,80
txt-record=fritzbox._http._tcp.steinel.home,"path=/"

srv-host=freetz._http._tcp.steinel.home,internet.steinel.home,81
txt-record=freetz._http._tcp.steinel.home,"path=/"


# SSH and SFTP Section
ptr-record=_ssh._tcp.steinel.home,fritzbox._ssh._tcp.steinel.home
ptr-record=_sftp-ssh._tcp.steinel.home,fritzbox._sftp-ssh._tcp.steinel.home

srv-host=fritzbox._ssh._tcp.steinel.home,internet.steinel.home,22
txt-record=fritzbox._ssh._tcp.steinel.home,"u=root"

srv-host=fritzbox._sftp-ssh._tcp.steinel.home,internet.steinel.home,22
txt-record=fritzbox._sftp-ssh._tcp.steinel.home,"u=root"

--- snap ---

You have to use a domain which is NOT suffixed by local. This is
normally used by zeroconf/avahi/bonjour to annouce the services.
MacOS, Linux and Windows are correctly recognizing the services
announced via DNS.

Best regards,
Andreas



More information about the Dnsmasq-discuss mailing list