DNSprivacy

DNS Leaks Explained: How They Happen, How to Detect Them, and How to Prevent Them

You're on a proxy — why can others still see which sites you visit? DNS leaks are the most common failure point for proxy users; the DNS resolution flow, where leaks occur, how to self-test, and how to plug them.

"I'm clearly on a proxy — how can anyone still know which websites I visit?"

Nine times out of ten the answer is: your DNS requests aren't going through the proxy. That's called a DNS leak.

First, understand DNS: the internet's phone book

When you visit www.example.com, the first thing your browser does is ask a DNS server: "What's the IP for this domain?"

The DNS server (usually assigned by your carrier) answers: "93.184.216.34", and only then does the browser actually start connecting.

Note the key point: the DNS query happens before the connection is established, and it's mostly plaintext over UDP port 53.

How the leak happens

Suppose you're on a proxy and your browser visits www.example.com:

  1. The ideal flow: the DNS query also goes out through the proxy, and both the website and DNS see only the proxy's IP
  2. What commonly happens: the system still sends the DNS query to your local carrier's DNS

At that point your carrier (and anything on the path that can listen to port 53 traffic) can't see the content you access, but can see which domains you resolve — "they visited example.com" is itself private information.

Typical triggers:

  • The proxy client only intercepts TCP traffic, not UDP 53
  • A statically configured system DNS that the proxy doesn't override
  • The browser's "secure DNS" (DoH) is on and has found its own upstream
  • The operating system's IPv6 DNS takes a different channel

How to detect it

The principle is simple: have the browser resolve a randomly generated domain that will only ever be used for this one test, while recording which IP the resolution request comes from.

  • If the resolution's exit = the exit of your HTTP traffic (both the proxy IP) → normal
  • If the resolution request comes from your carrier → DNS leak

This is exactly what the "DNS exit" item in the six-point check on the IPchase homepage does: the page generates a random subdomain, your device resolves it, we record the resolution source, then compare it with the HTTP exit. Nothing to install at any point.

How to prevent it

Method one: enable DNS interception in your proxy client

Mainstream clients (Clash, sing-box, Surge, etc.) all have a "DNS module" or "TUN mode". Once enabled, every port-53 request the system makes gets intercepted by the client and resolved through the proxy. This is the most thorough fix.

Method two: encrypted DNS (DoH/DoT)

Carry DNS queries over encrypted HTTPS (DoH) or TLS (DoT) transport, and your carrier at least can't see which domains you query.

But note: this is not a perfect substitute. Encrypted DNS solves "being watched", not "the DNS exit differing from the proxy exit" — in some detection scenarios, the two IPs differing still counts as a leak signature.

Method three: run a quick self-test whenever you use the proxy

After connecting the proxy, run one check at IPchase and see whether the "DNS exit" and "HTTP exit" match. It takes a few dozen seconds — far less effort than troubleshooting after an incident.

Common misconceptions

  • "I use DoH, so I can't leak" — DoH only encrypts; whether the exit matches the proxy is a separate matter
  • "A DNS leak exposes my browsing content" — it doesn't; it exposes domains only, but that's already sensitive
  • "Only bad guys need to care about this" — no; it's basic privacy hygiene for all proxy users

IPv6 is the fish that slips the net

A considerable share of "but I configured everything exactly per the tutorial" leaks are rooted in IPv6: the proxy client only intercepts IPv4 DNS, while the system keeps a separate DNS configuration for IPv6 networks (DNS servers handed out via RA), and queries leak straight out the v6 path.

How to self-check: during the test, watch whether each exit in the results is a v4 or v6 address. If your proxy only provides a v4 exit but the test shows one query leaving via a v6 exit — you've found the leak source. Remedies: enable IPv6 interception in the proxy client, or temporarily disable IPv6 at the OS level (at the cost of giving up v6 direct-connection acceleration).

How to verify after fixing

"I ran the config" and "I configured it right" are two different things — the verification steps can't be skipped:

  1. With the proxy on, run a full check at the IPchase homepage and confirm DNS exit = HTTP exit
  2. Switch to another proxy node and run it again — some clients only intercept DNS under certain routing rules
  3. Turn the proxy off and run it once more, confirming the check correctly distinguishes "direct state" from "proxied state" to rule out false positives
  4. Recheck every few days: OS updates and client upgrades can both reset network configuration

Make step 1 a fixed habit after connecting the proxy, and DNS leaks get caught on the spot.

Summary

A DNS leak = domain resolution requests bypassing the proxy, letting your carrier see your access trail. Detection relies on "random domains + comparing resolution sources"; prevention relies on DNS interception in the proxy client.

Further reading: WebRTC leaks — another commonly overlooked channel for exposing your real IP.

Check your own network: run a full disguise check on the homepage, or try the fingerprint test.