Skip to main content

Detect DNS leaks: verify your queries go through your chosen DNS server

Project description

DNS Leak Detective

Verify your DNS queries go through your chosen DNS server — not some upstream resolver you never agreed to.

Why?

You set up AdGuard Home, Pi-hole, or a custom DNS server. You pointed every device at it. But how do you know no queries are leaking past it to Google DNS or your ISP?

dns-leak-detective resolves real domains against your system's resolver and checks whether the responding server matches your expected DNS — locally, with zero API calls.

Install

pip install dns-leak-detective

Usage

# Basic: check against a single expected DNS server
dns-leak-detective --expected 192.168.1.50

# Multiple expected servers (e.g. primary + secondary)
dns-leak-detective --expected 192.168.1.50 192.168.1.51

# Verbose: see every query result
dns-leak-detective --expected 192.168.1.50 --verbose

Example output

  System resolver: 192.168.1.50
  Expected DNS:    192.168.1.50
  Test domains:    10

  OK:      10/10
  Leaks:   0/10
  Timeout: 0/10

  ✓  No leaks detected. All queries went through expected DNS.

If a query hits an unexpected server:

  ⚠  DNS LEAK DETECTED!
  Queries reached unexpected DNS servers:
    8.8.8.8: example.com, google.com

  Your DNS queries are NOT all going through your expected server.

How it works

  • Reads your system resolver from /etc/resolv.conf
  • Sends A-record queries for 10 well-known domains
  • Checks the responding DNS server IP against your expected server(s)
  • Reports leaks — all locally, no external API calls, no telemetry

Requirements

  • Python 3.10+
  • dnspython (installed automatically)

Related

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dns_leak_detective-0.1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dns_leak_detective-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file dns_leak_detective-0.1.0.tar.gz.

File metadata

  • Download URL: dns_leak_detective-0.1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dns_leak_detective-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c216868a4d51a660e5f866a6763bdd0425107bc504348192916fab0653ec9a85
MD5 c45da97960fdd7d3ed2ad2d14ee32e19
BLAKE2b-256 fa1ad4aee23e1afecb0ae7dc1aa0f96a849c6cc4e9610a3b9e1022c06d3a63cb

See more details on using hashes here.

File details

Details for the file dns_leak_detective-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dns_leak_detective-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dns_leak_detective-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc10da957cd3f3718ff04193df2c9e9437bae53490c55d3c3ca7b99dc3d594be
MD5 6a593ebac8a3763a6abd4685745ff680
BLAKE2b-256 d47b936160aaaeb7ae47352771e0ac05ca4cde1e3116ea9f807ecf2f1a2a673a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page