Skip to content

Instantly share code, notes, and snippets.

@rekomat
Last active June 27, 2020 07:48
Show Gist options
  • Save rekomat/72659772e7ee9502163605ab7740653c to your computer and use it in GitHub Desktop.
Save rekomat/72659772e7ee9502163605ab7740653c to your computer and use it in GitHub Desktop.

DNS Lookup Cheatsheet

Get DNS for a domain

$ dig -t NS pixelherz.com
pixelherz.com.		10534	IN	NS	ns1.netzone.ch.
pixelherz.com.		10534	IN	NS	ns3.netzone.ch.
pixelherz.com.		10534	IN	NS	ns2.netzone.ch.

$ dig -t NS pixelherz.com +short
ns1.netzone.ch.
ns3.netzone.ch.
ns2.netzone.ch.

Get records from a given DNS

$ dig @ns1.netzone.ch pixelherz.com 
pixelherz.com.		10800	IN	A	212.243.197.115

$ dig @ns1.netzone.ch -t MX pixelherz.com 
pixelherz.com.		10800	IN	MX	10 mx.netzone.ch.

Ressources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment