matsko
matsko

Reputation: 22183

Linux Command for a Raw DNS Response

Does anyone know how to fetch the raw output of a DNS query using a particular linux command?

The commands that I am familiar with are:

% host

% nslookup

% dig

% whois

however, each of these play around with DNS in some form or another, but how can I get the raw output that the server DNS spits out when its queried?

Many Thanks!

Upvotes: 7

Views: 4783

Answers (2)

matsko
matsko

Reputation: 22183

Turns out that the best solution to find out as much of the DNS stuff as possible is to use the host -v command.

host -v xxx.xxx.xxx.xxx

or

host -v domain.com

Upvotes: 7

jcomeau_ictx
jcomeau_ictx

Reputation: 38432

you could get it with tcpdump while running dig. I believe the flags would be tcpdump -n -s0 -x -X port 53

Upvotes: 5

Related Questions