Skip to content

Simple command line utility to make DNS lookups to the specified server


Notifications You must be signed in to change notification settings


Folders and files

Last commit message
Last commit date

Latest commit



81 Commits

Repository files navigation

Go Report Card Latest release Snap Store


Simple command line utility to make DNS lookups. Supports all known DNS protocols: plain DNS, plain DNS-over-TCP, DoH, DoT, DoQ, DNSCrypt.

How to install

  • Using homebrew:
    brew install ameshkov/tap/dnslookup
  • From source:
    go install
  • You can get a binary from the releases page.
  • You can install it from the Snap Store


Plain DNS, use default system resolver:


Plain DNS:


Plain DNS-over-TCP:

dnslookup tcp://


dnslookup tls://

DNS-over-TLS with IP:

dnslookup tls://

DNS-over-HTTPS with HTTP/2:


DNS-over-HTTPS with HTTP/3 support (the version is chosen automatically):

HTTP3=1 dnslookup

DNS-over-HTTPS forcing HTTP/3 only:

dnslookup h3://

DNS-over-HTTPS with IP:


DNS-over-HTTPS with basic auth (supported by AdGuard DNS):


DNSCrypt (stamp):

dnslookup sdns://AQIAAAAAAAAAFDE3Ni4xMDMuMTMwLjEzMDo1NDQzINErR_JS3PLCu_iZEIbq95zkSV2LFsigxDIuUso_OQhzIjIuZG5zY3J5cHQuZGVmYXVsdC5uczEuYWRndWFyZC5jb20

DNSCrypt (parameters):

dnslookup D12B:47F2:52DC:F2C2:BBF8:9910:86EA:F79C:E449:5D8B:16C8:A0C4:322E:52CA:3F39:0873


dnslookup quic://

Sending a PTR query for an IPv4 address (IP address is recognized automatically when RRTYPE is not specified):


Sending a PTR query for an IPv6 address (IP address is recognized automatically when RRTYPE is not specified):

dnslookup 2606:4700:4700::1111

Machine-readable format:

JSON=1 dnslookup

Disable certificates verification:

VERIFY=0 dnslookup tls://

Specify the type of resource record (default A):

RRTYPE=AAAA dnslookup tls://
RRTYPE=HTTPS dnslookup tls://

Specify the class of query (default IN):

CLASS=CH dnslookup tls://

Set DNSSEC DO bit in the request's OPT record:

DNSSEC=1 dnslookup tls://

Specify EDNS subnet:

SUBNET= dnslookup tls://

Add EDNS0 Padding:

PAD=1 dnslookup tls://

Specify EDNS option with code point code and optionally payload of value as a hexadecimal string: EDNSOPT=code:value. Example (equivalent of dnsmasq's --add-cpe-id=12345678):

EDNSOPT=65074:3132333435363738 RRTYPE=TXT dnslookup tls://

Combine multiple options:

RRTYPE=TXT SUBNET= PAD=1 dnslookup tls://

Verbose-level logging:

VERBOSE=1 dnslookup tls://