System administration

doh – DNS-over-HTTPS command-line client

doh is a command-line DNS client dedicated to DNS over HTTPS. Rather than sending conventional DNS queries directly to a resolver, it sends requests to DoH servers over HTTPS.

By default the program can query Google Public DNS, Cloudflare and Quad9. These services are queried concurrently, which makes it easy to compare the answers returned by several resolvers from a single command. You can also replace the defaults with your own DoH server URLs.

Multiple domain names can be queried in the same invocation and the queries themselves are performed concurrently. The DNS record type is configurable, allowing the client to retrieve records such as A, AAAA and MX.

Results are streamed to standard output as newline-delimited JSON objects. This makes doh particularly convenient for scripting and for use with utilities such as jq. Instead of presenting a heavily formatted interactive display, the program produces structured data that can be filtered, transformed or redirected to a file.

The client provides control over timeouts and the maximum number of retries made for each query. It also lets you specify the resolver used to look up the hostname of the DoH server itself, together with the network protocol used for that bootstrap lookup.

There is also an option to permit connections to DoH servers using certificates that cannot be verified, although that option naturally reduces the protection normally provided by HTTPS.

doh is a focused tool. It is especially useful when testing DoH endpoints, comparing resolver responses or incorporating encrypted DNS lookups into command-line workflows.

This is free and open source software.

Key Features

  • Queries DNS records using DNS over HTTPS.
  • Uses Google, Cloudflare and Quad9 as default resolvers.
  • Supports custom DNS-over-HTTPS servers.
  • Queries multiple resolvers and domains concurrently.
  • Supports configurable DNS record types.
  • Streams results as newline-delimited JSON.
  • Provides configurable timeouts and retry limits.
  • Allows control over bootstrap DNS resolution.

Website: github.com/picatz/doh
Support:
Developer: Kent Gruber
License: MIT License

doh is written in Go. Learn Go with our recommended free books and free tutorials.


Related Software

DNS Clients
dogColourful output, understands normal command-line argument syntax
doggoCommand-line DNS client for humans
qTiny command line DNS client supporting UDP, TCP, DoT, DoH, DoQ and ODoH
ddclientUpdate dynamic DNS entries
GoDNSDynamic DNS (DDNS) client tool
digDNS lookup utility
awlDNS lookup tool
ZDNSHigh-speed DNS resolver and command line utility
dnslookupMake DNS lookups
dugGlobal DNS propagation checker
drillPerform DNS lookups
dnessDynamic DNS client
In-a-DynSmall and simple Dynamic DNS, DDNS, client
dnsupdateModern and flexible dynamic DNS client
wigSimple and lightweight DNS client
dyndnscDynamic DNS update client

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our carefully curated directory of recommended free and open source software, covering every major software category.

The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more.

Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted