Friday, November 13, 2015

Dig Commands


Look up A record example.com as seen by 8.8.8.8 nameserver
dig @8.8.8.8 exampe.com

Show the MX record for a yahoo domain
dig yahoo.com MX

Show the TTL for a given domain
dig imagescape.com TTL

Show the TXT record for an yahoo domain
dig yahoo.com TXT

Show only the answer
dig yahoo.com +nocomments +noquestion +noauthority +noadditional +nostats

All Records
dig @8.8.8.8 imagescape.com ANY +noall +answer

Reverse Lookup
dig -x 198.178.132.10

Nice output that looks like the domain record
dig @ns.imagescape.com imagescape.com any +multiline +noall +answer

Find the authoritative nameserver for a domain:
dig -t ns imagescape.com +short

Find the SOA of the domain:
dig joejasinski.com soa +noall +answer


dig @ns1.linode.com joejasinski.com soa

; <<>> DiG 9.10.3-P4-Ubuntu <<>> @ns1.linode.com joejasinski.com soa
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- 64217="" id:="" noerror="" opcode:="" p="" query="" status:="">;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 5, ADDITIONAL: 11
;; WARNING: recursion requested but not available

;; ANSWER SECTION:
joejasinski.com. 86400 IN SOA ns1.linode.com. joe\.jasinski.gmail.com. 2014092859 14400 14400 1209600 86400


The presence "aa" indicates if the nameserver is the authoritative server.
The "2014092859" is the serial


Download a zone file (zone transfer):
dig axfr domain.com


Common Options:
  +short  = show only the results
  +[no]comments = show/hide the comments
  +[no]question = show/hide the question section
  +[no]authority = show/hide the authority section
  +[no]stats = show/hide the stats section
  +[no]answer = show/hide the answer section
  +[no]all = show/hide everything


https://neverendingsecurity.wordpress.com/2015/04/13/dig-commands-cheatsheet/
https://www.madboa.com/geek/dig/


Nice articles:

Commands
http://anouar.adlani.com/2011/12/useful-dig-command-to-troubleshot-your-domains.html

Create DNS Slave
http://www.microhowto.info/howto/configure_bind_as_a_slave_dns_server.html



7 comments:

Anonymous said...

Thanks for sharing your knowledge with us.
Dedicated Server UK
Dedicated Server in UK
Cheap Dedicated Server UK
Best Dedicated Server UK
Dedicated Server Hosting UK

rioraj said...


This post is so interactive and informative.keep updating more information...
Becoming A Full Stack Developer
Full Stack Developer Training

rithi said...

This post is so useful and informative. Keep updating with more information.....
IELTS Certification
IELTS Coaching In Bangalore

Anonymous said...

As you are providing information that is extremely good for everyone. We want to say that your knowledge is impressive and should be spread worldwide. If you want any other information about server hosting, Contact us without any hesitation. There are multiple hosting server solutions available on USA Server Hosting. For more information, click here - USA Dedicated Server

Anonymous said...

Hello guys,
I read your blog and I found it very good. There is a lot of good information on this blog, I'd like to share and I think people will get a lot of support from this blog. Thanks for sharing this informative blog, please keep up and share some unique posts with us in the future. Visit USA Dedicated ServerUSA Dedicated Server

Anonymous said...

Thank you for posting about your amazing experience on your website. France Dedicated Hosting offers all customers excellent server plans.....France Dedicated Server....... France Dedicated Server

Anonymous said...

I'm blown away by the uniqueness of this tech product! The way it seamlessly integrates different functionalities is simply mind-boggling........ France Dedicated Server