Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ameshkov/dnslookup
Simple command line utility to make DNS lookups to the specified server
https://github.com/ameshkov/dnslookup
Last synced: about 15 hours ago
JSON representation
Simple command line utility to make DNS lookups to the specified server
- Host: GitHub
- URL: https://github.com/ameshkov/dnslookup
- Owner: ameshkov
- License: mit
- Created: 2019-05-17T11:10:17.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-26T11:44:56.000Z (5 months ago)
- Last Synced: 2024-11-28T17:06:49.431Z (15 days ago)
- Language: Go
- Size: 4.27 MB
- Stars: 860
- Watchers: 23
- Forks: 73
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starz - ameshkov/dnslookup - Simple command line utility to make DNS lookups to the specified server (Go)
README
[![Go Report Card](https://goreportcard.com/badge/github.com/ameshkov/dnslookup)](https://goreportcard.com/report/ameshkov/dnslookup)
[![Latest release](https://img.shields.io/github/release/ameshkov/dnslookup/all.svg)](https://github.com/ameshkov/dnslookup/releases)
[![Snap Store](https://snapcraft.io/dnslookup/badge.svg)](https://snapcraft.io/dnslookup)# dnslookup
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 github.com/ameshkov/dnslookup@latest
```
* You can get a binary from
the [releases page](https://github.com/ameshkov/dnslookup/releases).
* You can install it from the [Snap Store](https://snapcraft.io/dnslookup)### Examples:
Plain DNS, use default system resolver:
```shell
dnslookup example.org
```Plain DNS:
```shell
dnslookup example.org 94.140.14.14
```Plain DNS-over-TCP:
```shell
dnslookup example.org tcp://94.140.14.14
```DNS-over-TLS:
```shell
dnslookup example.org tls://dns.adguard.com
```DNS-over-TLS with IP:
```shell
dnslookup example.org tls://dns.adguard.com 94.140.14.14
```DNS-over-HTTPS with HTTP/2:
```shell
dnslookup example.org https://dns.adguard.com/dns-query
```DNS-over-HTTPS with HTTP/3 support (the version is chosen automatically):
```shell
HTTP3=1 dnslookup example.org https://dns.google/dns-query
```DNS-over-HTTPS forcing HTTP/3 only:
```shell
dnslookup example.org h3://dns.google/dns-query
```DNS-over-HTTPS with IP:
```shell
dnslookup example.org https://dns.adguard.com/dns-query 94.140.14.14
```DNS-over-HTTPS with basic auth (supported
by [AdGuard DNS](https://adguard-dns.io/)):```shell
dnslookup example.org https://username:[email protected]/dns-query
```DNSCrypt (stamp):
```shell
dnslookup example.org sdns://AQIAAAAAAAAAFDE3Ni4xMDMuMTMwLjEzMDo1NDQzINErR_JS3PLCu_iZEIbq95zkSV2LFsigxDIuUso_OQhzIjIuZG5zY3J5cHQuZGVmYXVsdC5uczEuYWRndWFyZC5jb20
```DNSCrypt (parameters):
```shell
dnslookup example.org 176.103.130.130:5443 2.dnscrypt.default.ns1.adguard.com D12B:47F2:52DC:F2C2:BBF8:9910:86EA:F79C:E449:5D8B:16C8:A0C4:322E:52CA:3F39:0873
```DNS-over-QUIC:
```shell
dnslookup example.org quic://dns.adguard.com
```Sending a PTR query for an IPv4 address (IP address is recognized automatically
when RRTYPE is not specified):```shell
dnslookup 8.8.8.8
```Sending a PTR query for an IPv6 address (IP address is recognized automatically
when RRTYPE is not specified):```shell
dnslookup 2606:4700:4700::1111
```Machine-readable format:
```shell
JSON=1 dnslookup example.org 94.140.14.14
```Disable certificates verification:
```shell
VERIFY=0 dnslookup example.org tls://127.0.0.1
```Specify the type of resource record (default A):
```shell
RRTYPE=AAAA dnslookup example.org tls://127.0.0.1
RRTYPE=HTTPS dnslookup example.org tls://127.0.0.1
```Specify the class of query (default IN):
```shell
CLASS=CH dnslookup example.org tls://127.0.0.1
```Set DNSSEC DO bit in the request's OPT record:
```shell
DNSSEC=1 dnslookup example.org tls://8.8.8.8
```Specify EDNS subnet:
```shell
SUBNET=1.2.3.4/24 dnslookup example.org tls://8.8.8.8
```Add EDNS0 Padding:
```shell
PAD=1 dnslookup example.org tls://127.0.0.1
```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`):```shell
EDNSOPT=65074:3132333435363738 RRTYPE=TXT dnslookup o-o.myaddr.l.google.com tls://8.8.8.8
```Combine multiple options:
```shell
RRTYPE=TXT SUBNET=1.1.1.1/24 PAD=1 dnslookup o-o.myaddr.l.google.com tls://8.8.8.8
```Verbose-level logging:
```shell
VERBOSE=1 dnslookup example.org tls://dns.adguard.com
```