Wednesday, July 6, 2011

How do I list all the DNS records for a domain?

SkyHi @ Wednesday, July 06, 2011
There are two ways, both require administrator access or trust to the DNS records:

* Perform an AFXR transfer on the domain to retrieve all records for the domain. The DNS administrator needs to explicitly allow AFXR transfers to your IP address from your chosen DNS server. You can perform such a transfer like this: dig @ns1.google.com google.com AFXR
* Directly view the zonefile on the relevant DNS server. You need administrator access to the DNS server for this.



#[home]# host -t axfr condominiumfirst.com ns1.superb.net
Trying "condominiumfirst.com"
;; communications error to 66.36.226.4#53: end of file


[home]# dig @ns1.superb.net condominiumfirst.com any

; <<>> DiG <<>> @ns1.superb.net condominiumfirst.com any
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41483
;; flags: qr aa rd; QUERY: 1, ANSWER: 10, AUTHORITY: 0, ADDITIONAL: 5

;; QUESTION SECTION:
;condominiumfirst.com. IN ANY

;; ANSWER SECTION:
condominiumfirst.com. 86400 IN MX 10 condominiumfirst.com.inbound10.mxlogic.net.
condominiumfirst.com. 86400 IN MX 10 condominiumfirst.com.inbound10.mxlogicmx.net.
condominiumfirst.com. 86400 IN NS ns1.superb.net.
condominiumfirst.com. 86400 IN NS ns2.superb.net.
condominiumfirst.com. 86400 IN NS ns3.superb.net.
condominiumfirst.com. 86400 IN NS ns4.superb.net.
condominiumfirst.com. 86400 IN NS ns5.superb.net.
condominiumfirst.com. 86400 IN SOA ns1.superb.net. hostmaster.superb.net. 1255116905 0 0 0 0
condominiumfirst.com. 86400 IN TXT "v=spf1 mx mx:mail.condominiumfirst.com ~all"
condominiumfirst.com. 86400 IN A 209.61.248.54

;; ADDITIONAL SECTION:
ns1.superb.net. 86400 IN A 66.36.226.4
ns2.superb.net. 86400 IN A 209.160.56.15
ns3.superb.net. 86400 IN A 207.228.249.4
ns4.superb.net. 86400 IN A 207.228.225.4
ns5.superb.net. 86400 IN A 209.160.56.4

;; Query time: 95 msec
;; SERVER: 66.36.226.4#53(66.36.226.4)
;; WHEN: Fri Oct 9 12:39:21 2009
;; MSG SIZE rcvd: 449