This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

How to capture DNS packets for external addresses

0

Hello,

As in the title, does anyone know how to capture the dns packets but only for external resources?

If I simply specify port 53, then it captures all the packets including the internal resources which are on 10.0.0.0/24 range. 10.0.0.0/24 is a range I need to exclude to capture only external resources.

I also tried port 53 and not dst net 10.0.0.0/24 but does not work.

Thanks in advance, Peter

asked 27 Jul '11, 02:53

wooju's gravatar image

wooju
1111
accept rate: 0%

Sorry, i specified wrong interface and the quare actually works.

(27 Jul '11, 03:00) wooju

Ok, as I mentioned, the qury worked, but reqiarements changed a bit.

Is there a way I can exclude destination network 10.0.0.0/8 except of host 10.X.X.X ?

Curret code:

port 53 and not dst net 10.0.0.0/8

Thanks in advance

(27 Jul '11, 03:16) wooju

One Answer:

1

Yes, you can filter out the whole subnet except for one host with the following filter:

port 53 and (host 10.1.1.1 or not net 10.0.0.0/8)

answered 28 Jul '11, 11:24

SYN-bit's gravatar image

SYN-bit ♦♦
17.1k957245
accept rate: 20%