Proxy Leaks: DNS, WebRTC and IPv6 — How to Test and Fix Them

A working proxy can still leak your real IP through DNS, WebRTC or IPv6. Here is how to find and close the gaps.

14 min read

A leak happens when part of your traffic bypasses the proxy and reveals your real address or location. The three most common causes are DNS, WebRTC and IPv6.

DNS leaks

If your device resolves domain names with your own ISP’s DNS while the page loads through the proxy, observers can see which sites you visit. Use SOCKS5 with remote DNS (the socks5h scheme in curl, “Proxy DNS” in Firefox) or an HTTP proxy that resolves names itself.

WebRTC leaks

Browsers use WebRTC for real-time features, and it can disclose local and public addresses even when the page traffic uses a proxy. Disable or restrict WebRTC in privacy-focused browser profiles, or use a browser setting that forces it to use the proxy.

IPv6 leaks

If your network has IPv6 and your proxy only handles IPv4, some requests may leave your device over IPv6 directly. Disable IPv6 on the adapter for sensitive work or ensure the proxy covers it.

How to test

  1. With the proxy off, note your real IP using the IP address checker.
  2. Turn the proxy on and run the check again — the IP should differ.
  3. Use the DNS lookup tool and the headers checker to confirm nothing unexpected is exposed.
  4. Open the page in the same browser profile you use for real work, not a fresh one.
Proxy toolsDNS LookupLook up DNS records through public resolvers. Useful for checking IPv6 support, mail setup and domain ownership records.Explore

Where each leak is decided

Leaks follow from which layer makes a decision about the network path. Knowing the decision point tells you where the fix belongs, and why a setup that is correct for one program can leak in another.

DNS: who resolves the name

With an HTTP proxy, the client normally sends the hostname inside the CONNECT line or the request URL and the proxy resolves it, so no local lookup is needed. A SOCKS5 CONNECT request can carry either an IP address or a domain name, and the client library decides which. In curl and in Python’s requests, the scheme socks5:// resolves the name locally and sends only the address, while socks5h:// sends the name to the proxy. A local lookup shows the hostnames you visit to your own resolver and its operator, and it can also return a CDN address chosen for your real location instead of the proxy’s, which defeats the geo-targeting you paid for.

WebRTC: a path that does not use your proxy

WebRTC uses ICE to find a route between peers. It gathers candidates: local interface addresses, a public address learned from a STUN server over UDP, and optionally relay addresses. Because the STUN exchange is UDP sent from your machine, an HTTP proxy or a TCP-only SOCKS5 proxy does not carry it, so a script on the page can read the public address your operating system really uses. Current browsers hide local addresses behind random .local names unless the page holds camera or microphone permission, but the public candidate is a separate matter governed by the browser’s IP-handling policy. Defaults change between versions, which is why a test belongs in your routine.

IPv6: a second route to the same destination

Dual-stack machines prefer IPv6 and fall back to IPv4 when it fails (the “Happy Eyeballs” approach, RFC 8305). A proxy-aware application sends its traffic to the proxy, but any connection that ignores the proxy settings takes the system’s normal path, which on a dual-stack network may be IPv6. The result is a direct connection from an address that is not your proxy’s, and an IPv6 address can identify your connection just as clearly as an IPv4 one. If your proxy is IPv4-only, nothing on the proxy side can fix that; the fix is on your machine.

Fail-open behavior

The fourth route is not a protocol at all. Many setups fail open: a PAC file ending in DIRECT, a browser extension disabled by an update, a rule that falls through to a default of direct connection, or an application that honors the system proxy for only some of its traffic. If the proxy stops answering, the client quietly carries on with your real address. Prefer configurations that fail closed, such as a PAC string without DIRECT and a per-application rule whose action is the proxy, and verify it: stop the proxy or block its port and confirm that the application can no longer reach the internet.

What our tools can and cannot show

Be precise about what each test sees. The IP address checker reports the address of the connection that carried its page, so it shows whether web traffic from that browser or client is proxied; it cannot see your DNS queries or WebRTC. The DNS lookup tool queries public resolvers from our server and tells you what a name resolves to, not which resolver your device uses. The user-agent checker runs in your browser and shows the language, time zone and client hints that pages can read. The HTTP headers checker fetches response headers from a URL you give it and says nothing about your client. None of them tests WebRTC, so use a dedicated WebRTC test page in the exact browser profile you work in.

For DNS you have two reliable methods: a DNS leak test service that makes your client resolve unique hostnames and reports which resolvers reached its authoritative server, or a packet capture on your own machine. The capture below shows the difference between local and remote resolution directly. Flush the resolver cache first, or use a hostname you have not visited recently, otherwise a cached answer hides the query.

Bash
# Terminal 1 (Linux or macOS): print any DNS or DNS-over-TLS traffic
sudo tcpdump -n -i any "port 53 or port 853"

# Terminal 2, local resolution: a DNS query for example.com appears in terminal 1
curl -s -o /dev/null --proxy socks5://USER:PASS@HOST:PORT https://example.com

# Terminal 2, remote resolution: no query for example.com should appear
curl -s -o /dev/null --proxy socks5h://USER:PASS@HOST:PORT https://example.com

Two cautions when reading the capture. If the proxy’s own address is a hostname rather than an IP address, that name is always resolved locally, so look for the target hostname, not the proxy’s. And on systems with a local stub resolver you may see traffic to 127.0.0.53 first; what matters is whether a query for the target name leaves on the real network interface. On Windows, use Wireshark with the display filter dns and run ipconfig /flushdns beforehand.

Testing IPv6 and closing the gap

First find out whether your connection has working IPv6 at all. If it does not, there is nothing to leak and you can skip the rest of this section.

Bash
# Does this device have working IPv6? Prints an IPv6 address if so.
curl -6 --max-time 8 https://api6.ipify.org

# What does a dual-stack echo service see through your proxy?
curl -s --proxy http://USER:PASS@HOST:PORT https://api64.ipify.org

If the first command prints an address, every connection that skips the proxy will use it, so run the same test from inside the application’s own environment where you can. If it fails or times out, IPv6 is not available and this path is closed. Do not confuse the leak path with IPv6 proxies as a product: the IPv6 plans listed on this site are HTTP and HTTPS, and SOCKS5 is not confirmed for them.

Prefer a narrow fix: configure the application to use the proxy for all of its connections. If you must disable IPv6, do it on the specific adapter and know how to restore it. On Windows, in an elevated PowerShell:

PowerShell
Disable-NetAdapterBinding -Name "Ethernet" -ComponentID ms_tcpip6
# To restore:
Enable-NetAdapterBinding -Name "Ethernet" -ComponentID ms_tcpip6

Disabling IPv6 for a whole adapter can affect other software, so test your other applications afterwards and repeat the IPv6 check to confirm the change took effect.

Fixes by layer

  • DNS: use SOCKS5 with remote resolution or an HTTP proxy; in a proxifier, enable the option that resolves hostnames through the proxy; and check browser-level DNS-over-HTTPS settings, which can send lookups around the system resolver and should be tested rather than assumed.
  • WebRTC: restrict IP exposure in the browser profile you work in. Chromium-based browsers offer an enterprise policy named WebRtcIPHandling whose disable_non_proxied_udp value stops WebRTC from using UDP outside the proxy. Firefox has about:config preferences under media.peerconnection that can disable WebRTC entirely, at the price of breaking in-browser calls. Many anti-detect browsers expose WebRTC modes in their profile settings. Check exact names against your browser version.
  • IPv6: disable it for the adapter or make the application use the proxy for every connection, then repeat the IPv6 test.
  • Fail-open: remove DIRECT fallbacks, avoid NO_PROXY entries you cannot explain and test with the proxy deliberately switched off.
  • Scope: the Windows system proxy applies only to applications that read it. Programs with their own network stack, game launchers and many command-line tools ignore it, so configure them individually or route them through a proxifier.

Signals that are not leaks but still give you away

A clean IP does not make a profile consistent. Pages read the browser’s time zone, its language list and, if you grant permission, its geolocation, and none of those come from your IP. A profile showing an Istanbul exit with a US time zone and an English-only language list contradicts itself, and the user-agent checker on this site shows exactly what a page can read. Align the time zone and language with the exit’s market, and do not grant location permission to sites you test through a proxy: the Geolocation API uses device sources such as Wi-Fi, not your IP, so it can report where you really are.

Make verification a routine

A leak test is a snapshot. Repeat it after browser and operating-system updates, when you create a new profile, when you join a different network (a hotel Wi-Fi with IPv6 behaves differently from your office), after installing VPN or security software, and whenever you change proxy plan or protocol. Use the same short procedure each time so the results are comparable:

  1. Note your real address with the proxy off, then confirm that the IP address checker shows the proxy’s exit address with it on.
  2. Run a DNS leak test or the packet capture above and confirm that no target hostnames reach your own resolver.
  3. Open a WebRTC test page in the same profile and confirm that it shows no public address of yours.
  4. Run the two IPv6 commands above.
  5. Read the time zone and language in the user-agent checker and compare them with the exit location.
  6. Repeat the relevant steps in each application that matters, not only in one browser tab.

Frequently asked questions

Does a VPN make these leaks go away?

A device-wide VPN routes traffic at the operating-system level, which closes many leak paths by design, but a misconfigured VPN client can leak DNS or IPv6 in the same way. It is also a different tool: you cannot keep several network identities side by side with it. If you combine a VPN with a proxy, run the full test on the combined setup.

Is disabling WebRTC completely a good idea?

It closes the leak path, but it also breaks browser-based video calls, and a browser with WebRTC removed can look unusual to scripts that probe for it. Restricting IP exposure through a policy setting is usually less intrusive than removing the feature. We cannot promise how any site treats either choice, so test the profile on the sites you work with.

The IP checker shows my proxy’s address, but a website still shows my real country. What else could it be?

Look beyond the IP. A local DNS lookup can return a CDN edge for your real location, a saved account or cookie from an earlier session can carry your country, the browser’s language or time zone may point to it, and a page may use a geolocation permission instead of your IP. Clear the profile’s cookies, test with remote DNS and compare against a fresh profile to see which signal changed the result.

Not sure which plan fits?

Describe your use case and target countries and we will recommend a product — or tell you honestly when another type suits you better.