So here we have an example of why google is scared.... asking google to find the specific recipe for "what is the tcpdump incantation to sniff / filter only for ddns update packets" winds up with a billion pages of stuff not related to what I'm interested in... Lots of stuff about setting up a dns server, though.
so...
Anyone know the specific tcpdump filter you'd use to capture only dynamic dns update packets?
Wireshark and tcpdump both seem to recognize ddns update packets, (I'm using the wireshark example pcap file with ddns update packets from the wireshark wiki). So, at least I can just filter for port 53 traffic, but on this link that's going to be a metric-buttload of traffic.
Thanks! Sorry to ask a 101 type question...
Something like this seems to work for IPv4:
Reasoning (offsets relative to the start of the UDP packet - probably easiest to follow along with Wireshark open):
The DNS opcode is bits 3-6 (hence the mask 01111000 = 0x78) of byte 10, and for updates we want DNS opcode 5; 5 << 3 = 40 = 0x28.
For such a request, dnscap is clearly a superior solution because you can write DNS-specific requests.
A request like:
will keep, in the
updates.pcap
file only the ddns update requests.