Hacker News new | past | comments | ask | show | jobs | submit login
A Quick Primer on Dig (mrkaran.dev)
68 points by colinprince on Dec 8, 2019 | hide | past | favorite | 14 comments

I just needed to do some dns lookups recently and since I never really adapted to dig and don't actually have it on minimal installs, I went straight to DoH (on quad9.)

Memorizing a starting DoH url and the parameters actually seems like a more universal solution to be ready to bootstrap to naming anywhere from now on.

At any rate maybe a good related topic or comparison possibility. I found it interesting that I couldn't find a simple cheat sheet and just had to wing it on the parameter names.

The "host" command is easier to use than dig, at least for me. https://www.geeksforgeeks.org/host-command-in-linux-with-exa...

Thanks that actually is in my install and looks pretty good!

In recent years I've dealt with naming so little that I end up relying on getent, which is great until it's time to look into anything DNS specific.

You can also take a look at `nslookup` which is fairly easy to use as well.

I was using nslookup for decades, but all the distributions were threatening that it was going away.. Looks like that decision got reversed? :)

Surprised the article doesn’t mention getting all DNS records for a domain via a zone transfer:

dig axfr domain.com @nameserverforthedomain.com

* The nameserver has to be configured to allow zone transfers.

Author here. I actually didn't know about this, thanks for sharing. I'll update the article.

Most servers will refuse the request making it only very rarely helpful.

Unless it’s misconfigured.

"But isn’t that too long and painful (sorry for the pun) to type?" - where's the pun?

The command prior to that text is:

  dig redis +short
So... "long" is the opposite of "short"?

Maybe because it's the opposite of "quick and painless"?

Maybe it's a reference to https://xkcd.com/559/?

tl;dr a restated man page for dig, a dns information tool. It provides the name servers between this computer and the target. A very quick read, ~400 words of his and ~200 words of dig output.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact