How to Test for and Fix WebRTC and DNS Leaks in Your Browser
Record a direct-connection baseline, then check the browser’s public IP addresses, WebRTC candidates, and DNS resolvers separately. Fix one issue at a time and retest.
ok589 Editorial Team3 min read

1. Establish direct and proxied baselines
- On a network where direct connections are permitted, turn off the proxy and VPN, then open the public IP checker in the browser you want to test. Record the public IPv4 and IPv6 addresses and their providers. If the checker returns no address for either protocol, record “not detected,” not “no leak.”
- In the same browser, run a DNS leak test that generates random domain names and lists the resolvers that queried them. Record the resolver addresses and providers so you can recognize an unexpected fallback later.
- Enable the proxy without changing networks or other browser settings. Write down which exit the website should see and which service should resolve domain names: the proxy’s resolver, the tunnel’s configured resolver, or your chosen encrypted DNS service. A result passes if it matches your configuration; the web, WebRTC, and DNS addresses do not all have to match.

2. Check the website’s view first, then test WebRTC
- Reload the IP checker and check IPv4 and IPv6 separately. If IPv4 uses the proxy but IPv6 still matches your direct-connection baseline, fix the IPv6 route or proxy bypass rule first. An IPv4-only checker cannot verify IPv6 coverage.
- Open a WebRTC test page that lists candidate addresses. Start the test and wait for candidate collection to finish. Look at the public addresses discovered through STUN. If the list includes a direct public address you expected the proxy to hide, WebRTC has exposed another path even if the website sees the correct exit IP.
- A private IP address or a hostname ending in
.localis not a direct public IP address. Use the IANA IPv4 Special-Purpose Address Registry to identify unfamiliar IPv4 addresses. If the list is empty, record “no candidates collected”; that does not prove call traffic uses the proxy.

3. Verify the DNS path with fresh queries
- Leave the proxy on and start a new randomized DNS test rather than refreshing the previous results page. The test lists the recursive resolvers that queried its domains, which may differ from the preferred DNS server in your system settings.
- Compare each result with your expected provider and direct-connection baseline. If DNS should be resolved at the proxy but your direct ISP still appears, check the client’s local DNS and fallback settings. If both configurations use the same public resolver, its address alone cannot tell you whether the query traveled through the tunnel. Check the tunnel client’s routing logs.

4. Fix one issue at a time
| Symptom | What to change and verify |
|---|---|
| The website still sees the direct IP | Check whether the proxy applies only to selected sites. Review the automatic proxy configuration and bypass list, then retest on the same page. |
| Only WebRTC exposes the direct public IP | If supported, enable the browser policy that blocks non-proxied UDP. If you need voice or video calls, use a full tunnel that covers IPv4, IPv6, and UDP, then test a call. |
| DNS is still resolved locally with SOCKS5 | Enable remote DNS resolution in the client so it sends the domain name to the proxy instead of a locally resolved IP address. The SOCKS5 standard supports domain names, but clients do not necessarily use them by default. |
| The resolver does not match the configured service | Check whether the browser’s secure DNS setting overrides the system setting. Set the intended provider and check whether fallback is allowed if encrypted DNS fails. |

5. Retest checklist
- Close old connections and restart the browser. Confirm the website sees the expected exit and record separate IPv4 and IPv6 results.
- Collect a fresh set of WebRTC candidates and check that the direct public address does not appear. If you rely on voice or video, test an actual call.
- Run a fresh DNS test and check for unexpected resolvers. Repeat after switching networks or reconnecting the proxy. Save the time, configuration, and results so you can trace any fallback.