====== Wide-area-browsing in Bonjour ====== ===== Eigene Zone für Bonjour ===== Ich versammle alle meine Services in der Domain bonjour.30hopsmax.at: ''/etc/bind/db.30hopsmax.at'' bonjour IN NS nsa.30hopsmax.at. ''/etc/bind/named.conf.local'' zone "bonjour.30hopsmax.at" { type master; file "/etc/bind/db.bonjour.30hopsmax.at"; }; ===== Dynamische Updates ===== Zuerst muß ein Schlüssel erzeugt werden, damit die Zones vor unbefugten Updates geschützt ist: # dnssec-keygen -a HMAC-MD5 -b 128 -n ZONE bonjour.30hopsmax.at Kbonjour.30hopsmax.at.+157+24109 # cat Kbonjour.30hopsmax.at.+157+24109.key bonjour.30hopsmax.at. IN KEY 256 3 157 kfPIPLRnNSfP2j71wutEFQ== # rm Kbonjour.30hopsmax.at.+157+24109.key ''"kfPIPLRnNSfP2j71wutEFQ=="'' ist der Key und muß sowohl dem Nameserver als auch den Clients bekannt sein: ''/etc/bind/named.conf.local'' key bonjour.30hopsmax.at { algorithm hmac-md5; secret "kfPIPLRnNSfP2j71wutEFQ=="; }; zone "bonjour.30hopsmax.at" { type master; file "db.bonjour.30hopsmax.at"; allow-update { key bonjour.30hopsmax.at; }; }; ===== Browse-Domain ankündigen ===== So erfährt Bonjour, daß es auch in bonjour.30hopsmax.at nach Services suchen soll...: ''/etc/bind/db.30hopsmax.at'' b._dns-sd._udp.30hopsmax.at. IN PTR bonjour.30hopsmax.at. lb._dns-sd._udp.30hopsmax.at. IN PTR bonjour.30hopsmax.at. ... und wo es Updates hinschicken soll: ''/etc/bin/db.30hopsmax.at'' r._dns-sd._udp.30hopsmax.at. 3600 IN PTR bonjour.30hopsmax.at. ===== Die eigentliche Browse-Domain ===== Neue Zone -> eigener SOA-Eintrag; die PTR-Einträge zeigen Bonjour, daß hier tatsächlich Services findet. ''/etc/bind/db.bonjour.30hopsmax.at'' $TTL 1H @ IN SOA nsa.30hopsmax.at. hostmaster.30hopsmax.at ( 2006020303 ; Serial 3H ; Refresh 1H ; Retry 4W ; Expire 1M ) ; Negative Cache TTL IN NS nsa.30hopsmax.at. b._dns-sd._udp IN PTR @ lb._dns-sd._udp IN PTR @ r._dns-sd._udp IN PTR @ ===== Service-Einträge ===== Ein paar Beispiele für Services, die am Krautesel zur Verfügung stehen. Die TXT-Records müssen sein, selbst wenn ein Service keine weiteren Infos braucht. Wir setzen sie einfach auf "", da sonst die Applikationen die Services zwar finden, aber nichts mit ihnen anfangen können (Safari zeigt ein Bookmark, kann aber die Seite nicht öffnen). ''$ORIGIN'' wird von Bind automatisch an alle Hostnamen angehängt, die nicht mit . (Punkt) aufhören. Spart Tipparbeit. Der Name des Services (wie er zum Beispiel als Bookmark auftaucht) befindet sich auf der rechten Seite des PTR-Records. Alle UTF-8-Zeichen sind erlaubt, Leerzeichen erfordern "" um den Namen. ''/etc/named/db.bonjour.30hopsmax.at'' $ORIGIN _http._tcp.bonjour.30hopsmax.at. @ IN PTR "30 hops max" ; IN SRV "30 hops max" IN SRV 10 0 80 30hopsmax.at. IN TXT "" $ORIGIN _ssh._tcp.bonjour.30hopsmax.at. @ IN PTR Krautesel IN PTR Allerleirauh ; IN SRV Krautesel IN SRV 10 0 22 krautesel.30hopsmax.at. IN TXT "" Allerleirauh IN SRV 10 0 22 allerleirauh.30hopsmax.at. IN TXT ""