How to advertise iTunes Server using dnsmasq

1

How can I advertise an iTunes/DAAP-Server using dnsmasq?

None of these entries worked for me:

srv-host=_daap._tcp,192.168.1.100,3689
txt-record= _daap._tcp.192.168.1.100,port=3689

Tried to implement grawity's suggestion this way. No success yet.

ptr-record=_daap._tcp.dns-sd-services,"iTunes Server._daap._tcp.dns-sd-services"
srv-host=_daap._tcp,itunes.home,3689

user47498

Posted 2012-03-02T20:15:23.500

Reputation: 131

Answers

1

  1. Not all DNS-SD clients use unicast DNS (unless you specifically ask them.) Even those which do, might require a PTR record named b._dns-sd._udp pointing back to the domain. (See Setting up a Bonjour Name Server.)

  2. SRV records must point to a name. They cannot be pointed to an IP address directly.

  3. _daap._tcp SRV is not enough; in DNS-SD it must be a PTR record instead, and the SRV/TXT records should be under their own name, e.g. My library._daap._tcp. See Adding DNS-SD Service Discovery Records for more details.

  4. iTunes-published DNS-SD records have a lot more metadata than just the address/port; there are around 11 TXT fields published by default.

b._dns-sd._udp          PTR @
lb._dns-sd._udp         PTR @
_daap._tcp              PTR "My library._daap._tcp"
"My library._daap._tcp" SRV 0 0 3689 desktop
                        TXT ( "txtvers=1" "iTSh Version=196616" "Machine Name=....."
                              "Database ID=....." "OSsi=....." "and so on" )
desktop                 A 192.168.1.100

Really, just stick with mDNS for service advertisements... doing it manually will be a pain. (You can also set up Bonjour to update uDNS records, too, but not with dnsmasq - although bind9 works.)

user1686

Posted 2012-03-02T20:15:23.500

Reputation: 283 655

Thx for the detailed answer. I'm on a router and afaik there's neither mDNS nor bind9. I tried to implement your explanations (see above). Wasn't sure how to translate #1 to the dnsmasq syntax. Probably that's why it doesn't work yet. – user47498 – 2012-03-02T21:26:56.763

@user47498: mDNS would be running on the computers -- both on the iTunes host, and on client hosts; "Bonjour" for Windows/OSX and "Avahi" for Linux. – user1686 – 2012-03-02T21:37:33.477

1I need to be a little more informative: The server is on the openvpn network over tun. When I advertise it using dns-sd (on the Mac) I see the tracks in the local iTunes.app. The question came up because I'd like to do the advertising once on the router instead of doing it on the client each time before accessing the library. – user47498 – 2012-03-02T21:59:16.723