My company runs an internal DNS for "mycompany.com"

There is a machine on the network that I need to find, but I've forgotten it's name. If I could see a list, it would probably jog my memory.

How can I list all of the domain records for "mycompany.com"?

link|improve this question

50% accept rate
feedback

5 Answers

Try:

dig -tAXFR mycompany.com

This may or may not work. Many DNS servers will deny a DNS Zone Transfer like this. For more information, see How the AXFR protocol works

link|improve this answer
feedback

The approach you're trying to use won't work. See this question for more information. Assuming you're the admin (if you're not please discuss this with your admin and read the FAQ before posting again) simply look up the zone file.

link|improve this answer
feedback

The short answer is to your specific question of listing CNAMEs is that you can't without permission to do zone transfers (see How to list all CNAME records for a given domain?).

That said, you can use dig to list the other records by doing:

dig +nocmd yourdomain.com any +multiline +noall +answer
link|improve this answer
feedback

You can also use host DNS lookup utility with -l switch:

host -l domain.com

Of course you need DNS zone transfer rights for this to work.

link|improve this answer
same as dig -t AXFR domain.name – XXL Jan 15 at 23:33
feedback

I ended up using nmap to scan the network.

For example:

nmap -v -sP 192.16.0.0/16
link|improve this answer
2  
That's a good solution to your problem but not a great answer to the question "List all DNS records in a domain using dig?". You might want to edit your question and change the title. – Josh May 5 '10 at 19:20
3  
nmaping a /16 will generate 256^2 (65536) DNS lookups. I bet your DNS admins love you. – markdrayton May 5 '10 at 19:27
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.