Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mac Os X Terminal: How to view a domain's zone file?

Tags:

terminal

dns

zone

I'm trying to query a domain to retrieve its full DNS zone listings (A, MX, CNAME,…)

It seems that host -a is only returning the NS and MX records.

Any help would be much appreciated.

Thanks.

like image 425
Jannis Avatar asked Nov 23 '10 19:11

Jannis


People also ask

How do I access a zone file?

Locate the relevant domain, and click on the name to access the domain page. Go to the DNS section by clicking the DNS link on the left. Click on the Import link inside the zones card. Paste the content from the zone file into the text area, and click Import Zone .


1 Answers

→ dig -t ANY stackoverflow.com   ; <<>> DiG 9.6.0-APPLE-P2 <<>> -t ANY stackoverflow.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20242 ;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0  ;; QUESTION SECTION: ;stackoverflow.com.     IN  ANY  ;; ANSWER SECTION: stackoverflow.com.  1202    IN  A   64.34.119.12 stackoverflow.com.  65902   IN  NS  ns3.p19.dynect.net. stackoverflow.com.  65902   IN  NS  ns1.p19.dynect.net. stackoverflow.com.  65902   IN  NS  ns4.p19.dynect.net. stackoverflow.com.  65902   IN  NS  ns2.p19.dynect.net.  ;; Query time: 38 msec ;; SERVER: 192.168.1.254#53(192.168.1.254) ;; WHEN: Tue Nov 23 19:55:51 2010 ;; MSG SIZE  rcvd: 137 

Does that work for you?

like image 130
noodl Avatar answered Sep 22 '22 02:09

noodl