dnsq
is a simple DNS lookup tool written in Go. It provides both a command-line interface and a REST API server for performing simple CNAME, A, and AAAA DNS queries with given multiple host names.
I created this DNS lookup tool for the following reasons:
- To enable looking up multiple DNS entries simultaneously.
- To view DNS entries in server environments like Kubernetes clusters, as my local DNS lookup results were affected by company proxy settings.
These features make it easier to troubleshoot DNS-related issues.
brew install sunggun-yu/tap/dnsq
docker pull ghcr.io/sunggun-yu/dnsq
dnsq google.com www.github.com aws.amazon.com www.facebook.com
or, using docker image
docker run ghcr.io/sunggun-yu/dnsq google.com aws.amazon.com
This will return DNS information for multiple hosts google.com, www.github.com, aws.amazon.com, and www.facebook.com
dnsq server
By default, the server runs on port 8080. You can specify a different port using the --port
or -p
flag.
dnsq server -p 9090
you can also use container image for server instance.
docker run -d --name dnsq-server \
-p 8080:8080 \
ghcr.io/sunggun-yu/dnsq-server
The lookup page provides a simple form for querying DNS lookups. Simply enter the domain names you want to query, separated by commas or entered line by line, and click the 'Lookup' button.
To access the lookup page, open your web browser and navigate to http://localhost:8080
.
Note: The actual URL may differ based on your deployment method or chosen port number.
The API exposes a single endpoint for DNS lookups:
- Endpoint:
/api/lookup
- Method:
GET
- Query Parameter:
hosts
(comma-separated list of domain names)
Example request:
curl -s http://localhost:8080/api/lookup?hosts=google.com,blog.meowhq.dev,www.facebook.com
Example response: (assuming piped with jq
for pretty json)
{
"blog.meowhq.dev": [
{
"host": "blog.meowhq.dev",
"type": "A",
"data": "76.76.21.21"
}
],
"google.com": [
{
"host": "google.com",
"type": "A",
"data": "142.250.80.110"
}
],
"www.facebook.com": [
{
"host": "www.facebook.com",
"type": "A",
"data": "31.13.71.36"
}
]
}
kubectl apply -f https://raw.githubusercontent.com/sunggun-yu/dnsq/main/manifests/install.yaml