How to use DIG to get full DNS info?

0

How can I use DIG in one single command to get as much info on a domain name as possible,. including:

  • Subdomans
  • CNAME entries
  • A Records
  • TTL

Is this possible with one single command? How can you use dig to find out the most amount of information about a domain in one swift sweep?

coderama

Posted 2012-11-12T10:03:35.853

Reputation: 699

Answers

1

You could try a zone-transfer (see dig manual) but nowadays many DNS servers won't allow zone-transfers to unauthenticated clients (that are not configured DNS secondaries).


Update

If using BIND for DNS service add

allow-transfer {192.168.0.3;};

to the options clause in /etc/named.conf (or chrooted equivalent)

After restarting named, 192.168.0.3 should be able to perform zone-transfers using dig.

RedGrittyBrick

Posted 2012-11-12T10:03:35.853

Reputation: 70 632

Then perhaps I can rephrase --> how can you use dig to find out the most amount of information about a domain in one swift sweep? – coderama – 2012-11-12T10:17:46.617

@RD: If you can persuade the domain administrators to allow you to perform zone-transfers, you can use dig to obtain full zone-data. Otherwise you cannot list all records for a domain. – RedGrittyBrick – 2012-11-12T10:52:08.870

So, what command can I type to get the most amount of info, without speaking to an admin? (FYI: for the purpose of this exercise, I am technically the admin, with root access to the server) – coderama – 2012-11-12T13:50:58.677

sudo cat /var/named/* ? – RedGrittyBrick – 2012-11-12T14:40:04.503