ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-users: Re: [Wireshark-users] How to parse incoming DNS responses but do not query DNS s

From: Frank Cui <frankcui24@xxxxxxxxx>
Date: Wed, 9 Nov 2011 21:55:03 +0800
I think this task cannot be done by just playing with the wireshark tool alone. You need to instruct the system to use the mapping relationship that already exists in the capture dump.

Here is a brief description of the process that you could use to write a script. First use the tshark find the response packet AND result code=0(which means that the dns query is done successfully, note the actual field name could be something different). If there exists such packets, then subtract the name and ip in this packet. Lastly clear your dns cache, and add in the host file this mapping relationship.

Hope this helps

Frank
Sent from my iPad

On 2011-11-10, at 7:25 AM, Matthew <matthew1471@xxxxxxxxxxxxxxxxx> wrote:

> Hello,
> 
> I have already posted this to
> http://ask.wireshark.org/questions/7339/parse-incoming-dns-but-do-not-query-dns-server
> but know it is probably more likely to get answered on here:
> 
> I have a packet capture from my LAN that contains a DNS query (wireless)
> and response (192.168.0.7).
> 
> When I copy it to another network and turn on name resolution it
> attempts to ask the DNS server for the host name of the IP (192.168.0.7)
> of the traffic... then gives up because the DNS server doesn't have it,
> /but/ then notices that there is a DNS packet in the file already and
> uses the results of that. The HTTP session is then showing a destination
> of "wireless".
> 
> Turning off host name resolution shows only connections to 192.168.0.7
> 
> How can I make Wireshark (or tshark) look at the DNS in the file and see
> if it resolves the IP addresses to hostnames but *not* have it issue
> queries to the DNS server of my machine which take a while to time out
> and slow the loading of files down?
> 
> Basically I want to do a filter on "ip.host == wireless" which the trace
> contains the DNS request and response to (and it works if I leave name
> resolution enabled even on a different network) but I want to cut out
> querying my DNS servers (which turning on name resolution does).
> 
> Thanks for your time,
> Matthew
> 
> 
> ___________________________________________________________________________
> Sent via:    Wireshark-users mailing list <wireshark-users@xxxxxxxxxxxxx>
> Archives:    http://www.wireshark.org/lists/wireshark-users
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-users
>             mailto:wireshark-users-request@xxxxxxxxxxxxx?subject=unsubscribe