I'm looking for a way to filter a packet capture in wireshark for instances where our server responds with "Refused" to a recursive DNS query.
dns.resp.type==
doesn't seem to offer anything that I see as a match to my request, do I need to look somewhere other than under dns.resp
altogether?
Based on https://www.wireshark.org/docs/dfref/d/dns.html you need to use
dns.flags.rcode
defined as:"Reply code" is defined in §4.1.1. of RFC 1035 as "response code" with "Refused" being value 5:
As Wireshark defines it as 2 bytes, maybe it is the whole structure depicted in the RFC:
So to compare
RCODE
to value 5 you may have to mask other bits.