Research publication Leak testing
IPv6 and WebRTC: the overlooked leak paths
IPv6 and WebRTC are the two leak paths most often missed in VPN testing. On dual-stack networks a tunnel that carries only IPv4 leaves IPv6 traffic, and the subscriber’s IPv6 prefix, outside the tunnel; in browsers, WebRTC candidate gathering can reveal local and public addresses to any web page.
Abstract
VPN clients are often tested on IPv4-only networks with leak-test pages that report a single address. Both habits hide two classes of exposure. First, dual-stack hosts prefer IPv6 for many destinations; if the tunnel carries only IPv4, IPv6 traffic leaves through the physical interface with an address whose prefix identifies the subscriber’s connection. Second, WebRTC’s Interactive Connectivity Establishment gathers host, server-reflexive and relay candidates and exposes them to page scripts; depending on the browser’s IP-handling mode, the VPN’s routing and the presence of IPv6, those candidates can include the physical interface’s addresses or the public address of the access network. We summarise the relevant standards — RFC 4861, 4862, 8981, 6724 and 8305 for IPv6; RFC 8445, 8489, 8656 and 8828 and the W3C WebRTC specification for ICE — describe the multicast-DNS obfuscation of host candidates that browsers deploy, and give test procedures using lab-controlled STUN and AAAA-only endpoints on dual-stack, IPv6-only and IPv4-only networks.
Why these two paths are missed
Two testing habits hide these paths. Test benches are often IPv4-only — many office and lab networks still are — so an IPv6 leak cannot occur during the test. And many leak checks are single web pages that report one address, which tells the tester little about which interface and which address family produced it. Both paths depend on the network as much as on the VPN client: the same client can be leak-free on an IPv4-only network and leak on almost every page load on a dual-stack one. This publication complements the DNS taxonomy in How DNS leaks happen in VPN clients: a technical taxonomy (VPNL-R-2026-001), where IPv6 resolvers form class DL-3.
IPv6 on a dual-stack network
How hosts acquire and prefer IPv6
IPv6, specified in RFC 8200 [1], is designed for automatic configuration: hosts configure global addresses from Router Advertisements using stateless address autoconfiguration [2], part of the Neighbor Discovery protocol [3]. The same advertisements provide a default router and, through the RDNSS option, DNS resolvers [4]. No user action is involved: plugging into a dual-stack network is enough.
When a destination has both A and AAAA records, the default address-selection rules of RFC 6724 prefer IPv6 for global destinations [5], and Happy Eyeballs version 2 races connections over both families while giving IPv6 a short head start [6]. On a dual-stack access network, therefore, a large share of connections to large services use IPv6 by default.
What leaks, and what it reveals
A tunnel configured only for IPv4 installs IPv4 routes and leaves the IPv6 default route of the physical interface untouched. Every connection the host chooses to make over IPv6 then leaves through the physical interface, outside the VPN, with the host’s own global IPv6 address as its source. Websites and services see that address; the access network sees the traffic.
The address identifies more than users tend to expect. A host’s global address combines a 64-bit network prefix, taken from the address block the access provider assigned to the subscriber, with a 64-bit interface identifier. Temporary addresses [7] change the interface identifier over time to limit tracking, but the prefix stays the same for as long as the provider keeps the assignment, and it identifies the connection at least as precisely as a public IPv4 address — without the sharing that carrier-grade NAT often introduces for IPv4.
Three ways a client can respond
- Carry IPv6 in the tunnel. The client assigns an IPv6 address inside the tunnel and routes
::/0(or::/1and8000::/1) through it. This is the only option that keeps IPv6-only destinations reachable. WireGuard, for example, carries both address families natively [8]. - Block IPv6 while connected. Firewall rules drop all IPv6 except the link-local traffic that Neighbor Discovery needs; applications fall back to IPv4 through Happy Eyeballs. This is effective and fails closed, at the cost of IPv6-only destinations. It is the IPv6 half of a kill switch, discussed in Kill switches compared: firewall-based vs route-based enforcement (VPNL-R-2026-003).
- Disable IPv6 on the physical interface. Superficially simple, but the setting is per interface: a new adapter, a driver update or an operating-system update can bring IPv6 back without the VPN client noticing. We treat it as a mitigation only if the client re-applies it on every network change and tests show it holding.
Transition mechanisms can create IPv6 connectivity even on IPv4-only networks. Teredo [9] tunnels IPv6 over UDP and IPv4; its addresses embed the IPv4 address and port from which the client was observed. Where such an adapter is active, it must be considered in the test.
IPv6-only networks and NAT64
Mobile and some enterprise networks provide IPv6-only access, with stateful NAT64 [10] and DNS64 [11] for reaching IPv4 services, often combined with 464XLAT [12] for IPv4-only applications. On such networks an IPv4-only VPN client must reach its server through NAT64 — by resolving the server name through DNS64, or by discovering the translation prefix and synthesising an address itself [13] — or fail. Failure to connect is not a leak, but how the client fails matters: a client that cannot connect yet does not block traffic leaves the device on the native IPv6 network without warning.
WebRTC and ICE candidates
WebRTC lets web pages establish peer-to-peer media and data channels. To find a working path between peers behind NATs and firewalls it uses Interactive Connectivity Establishment [14]: the browser gathers candidate addresses, exchanges them with the peer through the application’s signalling channel, and tests candidate pairs until one works. The W3C API exposes each gathered candidate to page scripts through the icecandidate event of RTCPeerConnection [15], and no permission prompt is needed when the page uses only a data channel. RFC 8827 discusses the security architecture within which this exposure was accepted [16].
// Runs in any page; a data channel needs no permission prompt.
const pc = new RTCPeerConnection({ iceServers: [{ urls: 'stun:stun.example.test:3478' }] });
pc.createDataChannel('probe');
pc.onicecandidate = (event) => {
if (event.candidate) console.log(event.candidate.candidate);
};
await pc.setLocalDescription(await pc.createOffer());
Candidate types
| Type | Where the address comes from | What it can reveal |
|---|---|---|
| host | An address of a local interface | A private LAN address, or the global IPv6 address of the physical interface; replaced by a random mDNS name in default browser configurations |
| srflx (server-reflexive) | The source address and port a STUN server observed [17] | The public address of whichever path the STUN request took — the VPN exit or the access network |
| prflx (peer-reflexive) | Learned from the peer during connectivity checks | Similar to srflx, visible to the remote peer |
| relay | An address allocated on a TURN server [18] | The relay’s address; hides the client’s own addresses from the peer |
IP-handling modes and mDNS obfuscation
RFC 8828 defines four modes that govern which addresses a browser may use and expose [19]:
- Mode 1 — enumerate all addresses: candidates are gathered on every interface.
- Mode 2 — default route plus associated local addresses: only the interface the operating system would use for the default route, including its private address.
- Mode 3 — default route only: as Mode 2, without exposing the private address.
- Mode 4 — force proxy: UDP is used only through a configured proxy or a TURN relay.
The RFC recommends Mode 2 as the default and permits Mode 1 when the user has granted the page access to a camera or microphone. Separately, browsers obfuscate host candidates by replacing the private address with a randomly generated name in the .local domain, which the peer resolves through multicast DNS [20, 21]. The real local address is then exposed only to pages that hold media permissions.
When WebRTC actually leaks through a VPN
With a full tunnel that carries both address families, and a browser in Mode 2, the default route is the tunnel interface: host candidates, where exposed, show the tunnel’s internal address, and server-reflexive candidates show the VPN exit. A WebRTC leak occurs under four conditions:
- Untunnelled IPv6. The IPv6 default route is the physical interface, so an IPv6 STUN request leaves outside the tunnel and its server-reflexive candidate carries the subscriber’s global IPv6 address (Figure 1).
- Split tunnelling. If split tunnelling excludes the browser, or the destinations used for STUN, the request leaves through the physical interface and the candidate shows the access network’s public address.
- Mode 1. Once a page holds media permissions, gathering covers every interface. On platforms where binding a socket to an interface’s address also selects that interface for sending, STUN requests from the physical interface bypass a route-based tunnel; firewall-based enforcement blocks them.
- Proxies instead of tunnels. Browser extensions that provide a “VPN” by configuring an HTTP or SOCKS proxy do not carry WebRTC’s UDP traffic. Chromium’s extension API exposes a WebRTC IP-handling policy, including a setting that disables non-proxied UDP, for this reason [22].
How to test
IPv6
- Use a dual-stack lab network with native IPv6 and Router Advertisements, and record the delegated prefix.
- Connect the VPN and record both routing tables —
ip -6 routeon Linux,netstat -rn -f inet6on macOS,route print -6on Windows. - From the device, request an AAAA-only test name on a server you control and record the source address in its logs; repeat with a dual-stack name.
- Capture on the physical interface for IPv6 traffic that is neither link-local nor multicast, in the steady state and during forced reconnects.
- Repeat on an IPv6-only network with NAT64 and DNS64, and on an IPv4-only network as a control.
tcpdump -n -i en0 -w v6-run-03.pcap 'ip6 and not net fe80::/10 and not net ff00::/8'
WebRTC
- Host a candidate-gathering page and a STUN server in the lab, so that the STUN server’s logs record the source address of every binding request independently of what the page reports.
- Load the page in each browser under test, without media permission (default mode) and with camera permission granted (Mode 1).
- Record every candidate: type, address family, address, and whether host addresses are mDNS names. Redact addresses that identify the lab connection in published evidence.
- Compare server-reflexive addresses and STUN log entries with the VPN exit addresses; any access-network address, IPv4 or IPv6, is a leak.
- Repeat with split tunnelling enabled, with IPv6 available, and with any browser extension the VPN provider supplies.
Both procedures are part of our leak-testing methodology, and captures and logs are handled under the evidence-handling procedure.
Limitations
Browser behaviour changes frequently and differs between versions and enterprise policies, so results apply to the browser builds tested. Candidate exposure also depends on operating-system routing semantics, which differ between platforms. Finally, a test page sees only what the browser exposes to scripts; a peer in a real call also learns addresses through connectivity checks, which is why server-side STUN logs are part of the procedure.
References
All sources are publicly available primary documents. Numbers correspond to the bracketed citations in the text.
- 1Deering, S., & Hinden, R. (2017). Internet Protocol, Version 6 (IPv6) Specification (RFC 8200). RFC Editor. https://www.rfc-editor.org/rfc/rfc8200
- 2Thomson, S., Narten, T., & Jinmei, T. (2007). IPv6 Stateless Address Autoconfiguration (RFC 4862). RFC Editor. https://www.rfc-editor.org/rfc/rfc4862
- 3Narten, T., Nordmark, E., Simpson, W., & Soliman, H. (2007). Neighbor Discovery for IP version 6 (IPv6) (RFC 4861). RFC Editor. https://www.rfc-editor.org/rfc/rfc4861
- 4Jeong, J., Park, S., Beloeil, L., & Madanapalli, S. (2017). IPv6 Router Advertisement Options for DNS Configuration (RFC 8106). RFC Editor. https://www.rfc-editor.org/rfc/rfc8106
- 5Thaler, D. (Ed.), Draves, R., Matsumoto, A., & Chown, T. (2012). Default Address Selection for Internet Protocol Version 6 (IPv6) (RFC 6724). RFC Editor. https://www.rfc-editor.org/rfc/rfc6724
- 6Schinazi, D., & Pauly, T. (2017). Happy Eyeballs Version 2: Better Connectivity Using Concurrency (RFC 8305). RFC Editor. https://www.rfc-editor.org/rfc/rfc8305
- 7Gont, F., Krishnan, S., Narten, T., & Draves, R. (2021). Temporary Address Extensions for Stateless Address Autoconfiguration in IPv6 (RFC 8981). RFC Editor. https://www.rfc-editor.org/rfc/rfc8981
- 8Donenfeld, J. A. (2017). WireGuard: Next Generation Kernel Network Tunnel. In Proceedings of the Network and Distributed System Security Symposium (NDSS 2017). Internet Society. https://doi.org/10.14722/ndss.2017.23160 https://www.wireguard.com/papers/wireguard.pdf
- 9Huitema, C. (2006). Teredo: Tunneling IPv6 over UDP through Network Address Translations (NATs) (RFC 4380). RFC Editor. https://www.rfc-editor.org/rfc/rfc4380
- 10Bagnulo, M., Matthews, P., & van Beijnum, I. (2011). Stateful NAT64: Network Address and Protocol Translation from IPv6 Clients to IPv4 Servers (RFC 6146). RFC Editor. https://www.rfc-editor.org/rfc/rfc6146
- 11Bagnulo, M., Sullivan, A., Matthews, P., & van Beijnum, I. (2011). DNS64: DNS Extensions for Network Address Translation from IPv6 Clients to IPv4 Servers (RFC 6147). RFC Editor. https://www.rfc-editor.org/rfc/rfc6147
- 12Mawatari, M., Kawashima, M., & Byrne, C. (2013). 464XLAT: Combination of Stateful and Stateless Translation (RFC 6877). RFC Editor. https://www.rfc-editor.org/rfc/rfc6877
- 13Savolainen, T., Korhonen, J., & Wing, D. (2013). Discovery of the IPv6 Prefix Used for IPv6 Address Synthesis (RFC 7050). RFC Editor. https://www.rfc-editor.org/rfc/rfc7050
- 14Keranen, A., Holmberg, C., & Rosenberg, J. (2018). Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal (RFC 8445). RFC Editor. https://www.rfc-editor.org/rfc/rfc8445
- 15World Wide Web Consortium (W3C). (2021). WebRTC: Real-Time Communication in Browsers (W3C Recommendation; latest version). W3C. https://www.w3.org/TR/webrtc/
- 16Rescorla, E. (2021). WebRTC Security Architecture (RFC 8827). RFC Editor. https://www.rfc-editor.org/rfc/rfc8827
- 17Petit-Huguenin, M., Salgueiro, G., Rosenberg, J., Wing, D., Mahy, R., & Matthews, P. (2020). Session Traversal Utilities for NAT (STUN) (RFC 8489). RFC Editor. https://www.rfc-editor.org/rfc/rfc8489
- 18Reddy, T. (Ed.), Johnston, A. (Ed.), Matthews, P., & Rosenberg, J. (2020). Traversal Using Relays around NAT (TURN): Relay Extensions to Session Traversal Utilities for NAT (STUN) (RFC 8656). RFC Editor. https://www.rfc-editor.org/rfc/rfc8656
- 19Uberti, J., & Shieh, G. (2021). WebRTC IP Address Handling Requirements (RFC 8828). RFC Editor. https://www.rfc-editor.org/rfc/rfc8828
- 20Fablet, Y., de Borst, J., Uberti, J., & Wang, Q. (n.d.). Using Multicast DNS to protect privacy when exposing ICE candidates (Internet-Draft draft-ietf-mmusic-mdns-ice-candidates). Internet Engineering Task Force. Work in progress. https://datatracker.ietf.org/doc/draft-ietf-mmusic-mdns-ice-candidates/
- 21Cheshire, S., & Krochmal, M. (2013). Multicast DNS (RFC 6762). RFC Editor. https://www.rfc-editor.org/rfc/rfc6762
- 22Google. (n.d.). chrome.privacy — Chrome Extensions API reference. Chrome for Developers. https://developer.chrome.com/docs/extensions/reference/api/privacy
Cite this publication
APA style
VPN Network Research Labs. (2026, September 15). IPv6 and WebRTC: The overlooked leak paths (Research Publication No. VPNL-R-2026-005, Version 1.1). https://vpn.com.de/research/ipv6-and-webrtc-leak-paths
BibTeX
@techreport{vpnl-r-2026-005,
author = {{VPN Network Research Labs}},
title = {{IPv6 and WebRTC: the overlooked leak paths}},
institution = {VPN Network Research Labs},
type = {Research Publication},
number = {VPNL-R-2026-005},
year = {2026},
month = sep,
date = {2026-09-15},
version = {1.1},
url = {https://vpn.com.de/research/ipv6-and-webrtc-leak-paths},
langid = {en},
note = {Version 1.1, updated 2026-11-03}
}
Download citation
Cite the document ID and the version you read. Document IDs are permanent; substantive changes receive a new version number and an entry in the revision history below.
Revision history
| Version | Date | Change |
|---|---|---|
| 1.1 | Added the RFC 8828 mode summary and an IPv6-only network with NAT64 to the IPv6 test procedure. | |
| 1.0 | Initial publication. |
Found an error? Write to support@vpn.com.de. Corrections are handled under our corrections and retractions policy and are never applied silently.
Methodology and definitions
Terms used in this publication
Test records
This publication contains no results about specific products. Product tests, audits and their evidence are published in the Report Registry and the Evidence Database.