go - Dumping Avahi & Bonjour, DNS-SD Zone Files -


i'm looking make improvements go library mdns: https://github.com/davecheney/mdns/

i've spoken author, says "i got point worked me", , that's fine, within spirit of open source.

he mentioned interoperability problems avahi, bonjour , dns-sd discovery tools not finding services has exported.

i'm looking understand records published avahi when doing simple service port, , simple name.

i had expected appropriate version of:

dig @localhost .local -t axfr 

might have avahi export it's zone, didn't work me (cue "you doing wrong"!) - i'd understand minimum records exported typical avahi service, , examine same automatically exported lee-hambleys-macbook.local apple implementation on notebook might able improve go lang support mdns.

when other people working avahi/bonjour/mdns, tools use dig in , check things working expected?

the kind folks of #avahi kind enough give me following tip:

 killall -usr1 avahi-daemon 

that causes avahi-daemon dump it's zone file syslog.

but ideally i'd know how best query server, tcpdump looks promising, it's still showing records lookedup, not complete dump of that's in zone:

sudo tcpdump dst port 53 password: tcpdump: verbose output suppressed, use -v or -vv full protocol decode listening on en0, link-type en10mb (ethernet), capture size 65535 bytes 09:43:28.883763 ip 192.168.178.41.50916 > resolver2.opendns.com.domain: 50479+ a? e3191.c.akamaiedge.net. (40) 09:43:29.046201 ip 192.168.178.41.61989 > resolver2.opendns.com.domain: 55378+ ptr? 251.0.0.224.in-addr.arpa. (42) 09:43:29.123784 ip 192.168.178.41.56659 > resolver2.opendns.com.domain: 26471+ a? p05-btmmdns.icloud.com.akadns.net. (51) 09:43:29.819277 ip 192.168.178.41.53504 > resolver2.opendns.com.domain: 32010+ ptr? 220.220.67.208.in-addr.arpa. (45) 09:43:47.379251 ip 192.168.178.41.50916 > resolver2.opendns.com.domain: 50479+ a? e3191.c.akamaiedge.net. (40) 09:43:55.900406 ip 192.168.178.41.60511 > resolver2.opendns.com.domain: 32846+ aaaa? lc22.prod.livefyre.com. (40) 09:44:04.115159 ip 192.168.178.41.50916 > resolver2.opendns.com.domain: 50479+ a? e3191.c.akamaiedge.net. (40) ^c 7 packets captured 3187 packets received filter 0 packets dropped kernel 

mdns not support zone transfers due way protocol works. far can tell there 2 possible approaches:

1) try brute force approach, querying target (server/subnet). can dig, send query multicast address , query target, eg.

dig -x 192.168.0.10 -p 5353 @224.0.0.251

there few ready scripts , tools assist in enumerating mdns targets. examples include

2) force daemon dump zone file (or settings). found out avahi obeys

killall -usr1 avahi-daemon

apple's bonjour includes mdnsresponder not implement dumping zone information. can add more logging similar benefits

a sigusr1 signal toggles additional logging, warning , notice enabled default:

   % sudo killall -usr1 mdnsresponder 

once logging enabled, users can additionally use syslog(1) change log filter process. example, enable log levels emergency - debug:

   % sudo syslog -c mdnsresponder -d 

a sigusr2 signal toggles packet logging:

   % sudo killall -usr2 mdnsresponder 

a siginfo signal dump snapshot summary of internal state /var/log/system.log:

   % sudo killall -info mdnsresponder 

also, wireshark might used debug protocol errors. should enough solving interoperability errors.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -