Page content

Dog (echo dig |sed ’s/i/o/')

you know nslookup, dig, hosts, getenv and all the commans for the cli. but have you ever tried dog ?


and their Doku:

dog is an open-source DNS client for the command-line. It has colourful output, supports the DoT and DoH protocols, and can emit JSON.

Install Package

$ doas pkg_add dog


DNS over TLS

$ dog --tls

DNS Request over HTTPS

$ dog -H @
A 18m08s

Json Support

$ dog --json | jq .responses[0].answers[0]
  "address": "",
  "class": "IN",
  "name": "",
  "ttl": 7111,
  "type": "A"

Full Help File

$ dog --help
dog ● command-line DNS client

  dog [OPTIONS] [--] <arguments>

  dog                          Query a domain using default settings
  dog MX                       ...looking up MX records instead
  dog MX @              ...using a specific nameserver instead
  dog MX @ -T           ...using TCP rather than UDP
  dog -q -t MX -n -T   As above, but using explicit arguments

Query options:
  <arguments>              Human-readable host names, nameservers, types, or classes
  -q, --query=HOST         Host name or IP address to query
  -t, --type=TYPE          Type of the DNS record being queried (A, MX, NS...)
  -n, --nameserver=ADDR    Address of the nameserver to send packets to
  --class=CLASS            Network class of the DNS record being queried (IN, CH, HS)

Sending options:
  --edns=SETTING           Whether to OPT in to EDNS (disable, hide, show)
  --txid=NUMBER            Set the transaction ID to a specific value
  -Z=TWEAKS                Set uncommon protocol-level tweaks

Protocol 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

Output options:
  -1, --short              Short mode: display nothing but the first result
  -J, --json               Display the output as JSON
  --color, --colour=WHEN   When to colourise the output (always, automatic, never)
  --seconds                Do not format durations, display them as seconds
  --time                   Print how long the response took to arrive

Meta options:
  -?, --help               Print list of command-line options
  -v, --version            Print version information

Happy Dog !

Any Comments ?

sha256: fa783608bef7e03de0f50cfdcd067032778bc821581a6fe7d979b0f0af8ad7e0