From: ValdikSS Message-ID: Date: Sat, 15 Apr 2017 17:36:36 +0300 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------51C73D076036AD8207E48185" Content-Language: en-GB Subject: [Openvpn-devel] Windows 10 Anniversary Update broke --block-outside-dns List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: openvpn-devel@lists.sourceforge.net This is a multi-part message in MIME format. --------------51C73D076036AD8207E48185 Content-Type: multipart/alternative; boundary="------------393D4F70F53586F1761097FA" --------------393D4F70F53586F1761097FA Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Windows 10 Anniversary Update changed the way DNS works. It used to resolve DNS address using all available adapters and IP addresses in parallel, now it still resolves addresses using all available adapters but in sequence, beginning with random adapter. This interfere with how --block-outside-dns currently work. Sometimes OS chooses VPN TAP adapter and things work as intended, sometimes the other adapter and user have to wait until DNS request times out and DNS resolution goes via VPN. This behaviour introduces significant lag for web browsing. Another thing is that Windows always prefers IPv6, just as any other OS. Some home routers give IPv6 Unique local address with DNS server to the computers using DHCPv6, even if there's no IPv6 connectivity from the provider. More importantly, DisableSmartNameResolution switch, which didn't work in previous Windows 10 versions, now works correctly. *Workaround #1*, If VPN infrastructure is IPv6-enabled and pushes IPv6 address and DNS and route to the client: 1. Apply DisableSmartNameResolution registry patch. *Workaround #2*, if VPN infrastructure is not IPv6-enabled: 1. Apply DisableSmartNameResolution registry patch. 2. If there's IPv6 DNS from the router, set static IPv6 DNS to ::2 (alternative to 127.0.0.2 in IPv4) or just disable IPv6 completely on internet interface. *Workaround #3*, if VPN infrastructure is not IPv6-enabled and client's infrastructure is not IPv6-enabled: 1. Apply DisableSmartNameResolution registry patch. 2. Push IPv6 Unique local address and DNS server to the client, but do not push any routes. Client would use DNS over IPv6 but would not route anything else. *Note*: it would route IPv6 traffic over internet interface (not via VPN) if client's ISP is IPv6-enabled. *Question: *Fixing registry with --block-outside-dns is simple, but what should we do with IPv6 in OpenVPN? Should we introduce an option to disable IPv6 DNS on other interfaces if there's no IPv6 DNS pushed from the VPN? --------------393D4F70F53586F1761097FA Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit Windows 10 Anniversary Update changed the way DNS works. It used to resolve DNS address using all available adapters and IP addresses in parallel, now it still resolves addresses using all available adapters but in sequence, beginning with random adapter.
This interfere with how --block-outside-dns currently work. Sometimes OS chooses VPN TAP adapter and things work as intended, sometimes the other adapter and user have to wait until DNS request times out and DNS resolution goes via VPN.
This behaviour introduces significant lag for web browsing.

Another thing is that Windows always prefers IPv6, just as any other OS. Some home routers give IPv6 Unique local address with DNS server to the computers using DHCPv6, even if there's no IPv6 connectivity from the provider.

More importantly, DisableSmartNameResolution switch, which didn't work in previous Windows 10 versions, now works correctly.

Workaround #1, If VPN infrastructure is IPv6-enabled and pushes IPv6 address and DNS and route to the client:
  1. Apply DisableSmartNameResolution registry patch.


Workaround #2, if VPN infrastructure is not IPv6-enabled:
  1. Apply DisableSmartNameResolution registry patch.
  2. If there's IPv6 DNS from the router, set static IPv6 DNS to ::2 (alternative to 127.0.0.2 in IPv4) or just disable IPv6 completely on internet interface.


Workaround #3, if VPN infrastructure is not IPv6-enabled and client's infrastructure is not IPv6-enabled:
  1. Apply DisableSmartNameResolution registry patch.
  2. Push IPv6 Unique local address and DNS server to the client, but do not push any routes. Client would use DNS over IPv6 but would not route anything else.

    Note: it would route IPv6 traffic over internet interface (not via VPN) if client's ISP is IPv6-enabled.


Question: Fixing registry with --block-outside-dns is simple, but what should we do with IPv6 in OpenVPN? Should we introduce an option to disable IPv6 DNS on other interfaces if there's no IPv6 DNS pushed from the VPN?


--------------393D4F70F53586F1761097FA-- --------------51C73D076036AD8207E48185 Content-Type: application/x-7z-compressed; name="DisableSmartNameResolution.7z" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="DisableSmartNameResolution.7z" N3q8ryccAARSdjIvuwAAAAAAAACKAAAAAAAAAGhRGvvgAT0As10Af7+GiQMs9AFCgNY6KPFa Z0yWMRlFvk2FuWH8sovr24Fr/gUif0PGiV2MhuehqXIfb0txmm8PYsb82g5FyC8MYgIxZ2WM t7MYFh8r+lEvVIwZB58VDU/NeoL37lLBcv3e2COOlwrF1rm8mtmQoRwlrhWgQq4vB/zX0DMI zr9P2aaFZ1m/DP9FwB2oAdgD05YospHwPH+CfDXOKJEWmRhIOR2F+3qtkCxKQcPg3WjlU633 9uYAAQQGAAEJgLsABwsBAAEhIQEADIE+AAgKAUE6IqEAAAUBGQoAAAAAAAAAAAAAET8ARABp AHMAYQBiAGwAZQBTAG0AYQByAHQATgBhAG0AZQBSAGUAcwBvAGwAdQB0AGkAbwBuAC4AcgBl AGcAAAAZBAAAAAAUCgEAgGHn5Nu10gEVBgEAIIC0gQAA --------------51C73D076036AD8207E48185--