IPv6 泄露详解
如今大多数家庭和移动网络都是双栈网络:设备同时持有 IPv4 地址和一个或多个 IPv6 地址,而当目的地同时提供两种协议时,操作系统通常优先选择 IPv6(默认地址选择见 RFC 6724,“Happy Eyeballs”见 RFC 8305,即对两种地址族进行竞速连接)。如果 VPN 客户端只向隧道中写入 IPv4 路由,而保持物理接口上的 IPv6 默认路由不变,那么发往支持 IPv6 的服务的连接就会完全绕过隧道。
IPv6 地址具有很强的可识别性:全球地址的前缀往往会在很长时间内固定分配给某个家庭或某位移动用户。客户端可以通过两种方式正确处理 IPv6:在隧道中同时承载 IPv6 与 IPv4,或者在 VPN 连接期间在物理接口上阻断 IPv6。对 IPv6 不闻不问才是有缺陷的做法。
在只有 IPv4 连接的测试环境中,IPv6 泄露很容易被忽略。客户端可能在纯 IPv4 网络上通过泄露测试,却在双栈的家庭或移动连接上发生泄露,因此必须说明测试所用的网络。
VPN Labs 如何测试
VPN Labs 在具备原生 IPv6 的双栈上行链路上进行测试。隧道建立后,测试工具会请求仅支持 IPv6 的端点,并在物理接口上捕获不属于隧道流量的 IPv6 数据包。邻居发现等链路本地流量不计入;只有发往非本链路目的地的数据包才算作泄露。
对于选择阻断 IPv6 而非通过隧道承载的客户端,记录为“已受保护”,并将 IPv6 连接丢失注明为局限。
各方法论页面是对每项流程的权威描述;本摘要仅供参考。
相关研究
VPN Labs 发布的、深入讨论IPv6 泄露的出版物。
-
VPNL-R-2026-005
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…
阅读该出版物 -
VPNL-R-2026-001
How DNS leaks happen in VPN clients: a technical taxonomy
A DNS leak occurs when name-resolution traffic leaves a device outside the VPN tunnel, or reaches a resolver the VPN did not designate, while the tunnel is meant to be…
阅读该出版物 -
VPNL-R-2026-003
Kill switches compared: firewall-based vs route-based enforcement
A VPN kill switch stops traffic leaving outside the tunnel while the tunnel is unavailable. Firewall-based designs use default-deny filters that outlive tunnel…
阅读该出版物
标准与参考资料
引用本定义
VPN Network Research Labs.(2026). IPv6 泄露. VPN Labs 术语表. https://vpn.com.de/zh-cn/glossary/ipv6-leak
术语表 v1.1 · 术语编号 VPNL-G-003 · 最后更新于 。定义可在注明出处的前提下引用;如有错误,请依据更正政策报告。