dog(1)

๐Ÿ“ฆ
version 0.1.0 ยท 3 versions
, in opensuse-leap 16.0

๐Ÿถ dog(1) โ€” like, the manual page, bestie

okay so this is the manual page for dog, a command-line DNS client, and honestly? she's iconic. colourful output, DNS-over-TLS and DNS-over-HTTPS support, and she can even emit JSON. we're gonna go through the whole thing together, no skips, no cap ๐Ÿ’…


โœจ NAME โœจ

dog โ€” a command-line DNS client ๐Ÿ•


๐ŸŒธ SYNOPSIS ๐ŸŒธ

dog [options] [domains...]

dog is a command-line DNS client. It has colourful output, supports the DNS-over-TLS and DNS-over-HTTPS protocols, and can emit JSON. Literally all of that. In one little binary. ๐ŸŽ€


๐Ÿ’– EXAMPLES ๐Ÿ’–

  • dog example.net โ€” Query the A record of a domain using default settings. the classic starter pack ๐Ÿซถ
  • dog example.net MX โ€” ...looking up MX records instead. glow up, different record type โœจ
  • dog example.net MX @1.1.1.1 โ€” ...using a specific nameserver instead. picking your own fave resolver, we love agency ๐Ÿ‘‘
  • dog example.net MX @1.1.1.1 -T โ€” ...using TCP rather than UDP. switching it up ๐Ÿ’…
  • dog -q example.net -t MX -n 1.1.1.1 -T โ€” As above, but using explicit arguments. the "I like to be precise about things" version, and honestly? valid.

๐Ÿฆ‹ QUERY OPTIONS ๐Ÿฆ‹

okay bestie, these are the main character options โ€” the ones that decide what you're even asking:

  • -q, --query=HOST โ€” Host name or domain name to query. the thing you're actually curious about ๐Ÿ’œ
  • -t, --type=TYPE โ€” Type of the DNS record being queried (A, MX, NS...) โ€” pick your fighter โญ
  • -n, --nameserver=ADDR โ€” Address of the nameserver to send packets to. who's getting your question ๐ŸŽ€
  • --class=CLASS โ€” Network class of the DNS record being queried (IN, CH, HS). yes these exist, yes they're a vibe ๐ŸŒˆ

By default, dog will request A records using the system default resolver. At least one domain name must be passed โ€” dog will not automatically query the root nameservers. so don't come crying to her with zero arguments, she's not doing that ๐Ÿ˜ญ

Query options can be passed in using a command-line option, such as --query lookup.dog or --type MX, or as plain arguments, such as lookup.dog or MX. dog will make an intelligent guess as to what plain arguments mean (MX is quite clearly a type), which makes it easier to compose ad-hoc queries quickly. If precision is desired, use the long-form options. she's smart but she's not gonna read your mind forever ๐Ÿงš

If more than one domain, type, nameserver, or class is specified, dog will perform one query for each combination, and display the combined results in a table. For example, passing three type arguments and two domain name arguments will send six requests. math is mathing, she's booked and busy ๐Ÿ”ฅ

DNS traditionally uses port 53 for both TCP and UDP. To use a resolver with a different port, include the port number after a colon (:) in the nameserver address. iykyk ๐Ÿฉท


๐ŸŽ€ SENDING OPTIONS ๐ŸŽ€

  • --edns=SETTING โ€” Whether to opt in to DNS. This can be disable, hide, or show. three whole choices, pick wisely ๐Ÿ’ซ
  • --txid=NUMBER โ€” Set the transaction ID to a specific value. for the control freaks (affectionate) ๐Ÿ™ˆ
  • -Z=TWEAKS โ€” Set uncommon protocol-level tweaks. the secret menu, lowkey ๐Ÿ”ฎ

๐Ÿš€ TRANSPORT OPTIONS ๐Ÿš€

  • -U, --udp โ€” Use the DNS protocol over UDP.
  • -T, --tcp โ€” Use the DNS protocol over TCP.
  • -S, --tls โ€” Use the DNS-over-TLS protocol.
  • -H, --https โ€” Use the DNS-over-HTTPS protocol.

By default, dog will use the UDP protocol, automatically re-sending the request using TCP if the response indicates that the message is too large for UDP. Passing --udp will only use UDP and will fail in this case; passing --tcp will use TCP by default. so like, --udp is committed to the bit, for better or worse ๐Ÿ’€

The DNS-over-TLS (DoT) and DNS-over-HTTPS (DoH) protocols are available with the --tls and --https options. Bear in mind that the system default resolver is unlikely to respond to requests using these protocols โ€” so don't be shocked, she warned you ๐Ÿซถ

Note that if a hostname or domain name is given as a nameserver, rather than an IP address, the resolution of that host is performed by the operating system, not by dog. she's outsourcing that one, respectfully ๐ŸŒธ

Unlike the others, the HTTPS transport type requires an entire URL, complete with protocol, domain name, and path. full lewk required, no half measures ๐Ÿ‘‘


๐Ÿ’… OUTPUT OPTIONS ๐Ÿ’…

  • -1, --short โ€” Short mode: display nothing but the first result. minimalism era โœจ
  • -J, --json โ€” Display the output as JSON. for the devs ๐Ÿงš
  • --color, --colour=WHEN โ€” When to colourise the output. This can be always, automatic, or never. (both spellings, she's inclusive ๐Ÿณ๏ธโ€๐ŸŒˆ)
  • --seconds โ€” Do not format durations as hours and minutes; instead, display them as seconds. raw numbers, no frills ๐Ÿ’ซ
  • --time โ€” Print how long the response took to arrive. the "how long did u take" of it all ๐Ÿ˜ญ

โญ META OPTIONS โญ

  • --help โ€” Displays an overview of the command-line options. your lil map ๐Ÿ—บ๏ธ
  • --version โ€” Displays the version of dog being invoked. identity check ๐Ÿชž

๐Ÿ’œ ENVIRONMENT VARIABLES ๐Ÿ’œ

dog responds to the following environment variables:

๐ŸŒŸ DOG_DEBUG

Set this to any non-empty value to have dog emit debugging information to standard error. For more in-depth output, set this to the exact string trace. yes, literally trace. she said what she said ๐Ÿ”


๐Ÿ“ RECORD TYPES ๐Ÿ“

dog understands and can interpret the following record types:

  • A โ€” IPv4 addresses
  • AAAA โ€” IPv6 addresses
  • CAA โ€” permitted certificate authorities
  • CNAME โ€” canonical domain aliases
  • HINFO โ€” system information and, sometimes, forbidden request explanations
  • LOC โ€” location information
  • MX โ€” e-mail server addresses
  • NAPTR โ€” DDDS rules
  • NS โ€” domain name servers
  • OPT โ€” extensions to the DNS protocol
  • PTR โ€” pointers to canonical names, usually for reverse lookups
  • SOA โ€” administrative information about zones
  • SRV โ€” IP addresses with port numbers
  • SSHFP โ€” SSH key fingerprints
  • TLSA โ€” TLS certificates, public keys, and hashes
  • TXT โ€” arbitrary textual information

When a response DNS packet contains a record of one of these known types, dog will display it in a table containing the type name and a human-readable summary of its contents. readable and cute, we stan ๐Ÿ’–

Records with a type number that does not map to any known record type will still be displayed. As they cannot be interpreted, their contents will be displayed as a series of numbers instead. she's not ignoring them, she just doesn't speak that language ๐Ÿ™ˆ

dog also contains a list of record type names that it knows the type number of, but is not able to interpret, such as IXFR or ANY or AFSDB. These are acceptable as command-line arguments, meaning you can send an AFSDB request with dog AFSDB. However, their response contents will still be displayed as numbers. They may be supported in future versions of dog. future era, not yet ๐Ÿ‘€


๐Ÿ”ง PROTOCOL TWEAKS ๐Ÿ”ง

The -Z command-line argument can be used one or more times to set some protocol-level options in the DNS queries that get sent. It accepts the following values:

  • aa โ€” Sets the AA (Authoritative Answers) bit in the query.
  • ad โ€” Sets the AD (Authentic Data) bit in the query.
  • bufsize=NUM โ€” Sets the UDP payload size field in the OPT field in the query. This has no effect if EDNS is diabled. (yes, that's how it's spelled in the original, she's keeping it fr fr ๐Ÿ˜ญ)
  • cd โ€” Sets the CD (Checking Disabled) bit in the query.

๐Ÿšจ EXIT STATUSES ๐Ÿšจ

  • 0 โ€” If everything goes OK. slay ๐Ÿ’…
  • 1 โ€” If there was a network, I/O, or TLS error during operation. rough.
  • 2 โ€” If there is no result from the server when running in short mode. This can be any received server error, not just NXDOMAIN. so don't assume, bestie ๐Ÿ’€
  • 3 โ€” If there was a problem with the command-line arguments. we've all been there ๐Ÿซ 

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

dog is maintained by Benjamin ogham Sago. the icon behind the icon โœจ


and that's the whole page, bestie ๐ŸŽ€ this was dog, version v0.1.0, living in the General Commands Manual โ€” go query something iconic and remember: the vibe changes, the facts do not. mwah ๐Ÿ’‹๐Ÿถ

๐Ÿ“ฆ where this page comes from