Windows App is unable to resolve DNS for IPv6 only endpoints.

Nat Gist nat.gist at gmail.com
Wed Sep 2 13:42:48 UTC 2026


So this issue is a little more subtle than I thought, I had some
configuration issues with my local IPv6 setup such that I wasn't
getting a global IPv6 address when testing this, but I did have a
local IPv6 address. If there's a valid global IPv6 address everything
works fine and the IPv6 endpoint is resolved. With AF_UNSPEC
presumably if there's no IPv6 address windows only tries to resolve
the A record since it assumes you don't have a global IPv6 address
anyway, this seems like a bad design decision in windows but it is
what it is.

In any case I think DNS resolution failure isn't the right error
message to have happen when the actual issue is a non-existent route
to the endpoint. So I think my suggestion of explicitly querying
AF_INT6 would still be worthwhile to implement even though there's no
issue in a properly configured IPv6 network.

I guess if you wanted to tunnel using local IPv6 addresses it'd fail
but I'm not sure why anyone would want to do that(other than for
testing).

Thanks,
Nat

On Tuesday, September 1st, 2026 at 4:53 PM, Nat Gist <nat.gist at gmail.com> wrote:

> Problem description:
> When using an ipv6 only endpoint the DNS resolution in windows app fails.
>
> Steps to reproduce:
> Using the windows app try to connect to an endpoint using it's hostname where there is only an AAAA record and no A record.
>
> Root Cause:
> Trying to connect produces the following error
> "Unable to resolve one or more DNS hostname endpoints: The requested name is valid, but no data of the requested type was found."
>
> The first half of the error message(before the : ) comes from ErrorDNSLookup
> https://github.com/WireGuard/wireguard-windows/blob/4e6726c23ae9c5cb58e0c9910f3b7515621d133d/tunnel/service.go#L150
>
> The second half(after the :) comes from WSANO_DATA documented here:
> https://learn.microsoft.com/en-us/windows/win32/api/ws2tcpip/nf-ws2tcpip-getaddrinfow
>
> Looking at the implementation of resolveHostnameOnce(https://github.com/WireGuard/wireguard-windows/blob/4e6726c23ae9c5cb58e0c9910f3b7515621d133d/conf/dnsresolver_windows.go#L46)
> The hints specify "Family: windows.AF_UNSPEC" which causes windows to try and resolve both A and AAAA records, and it returns the error WSANO_DATA when no IPv4 address is found. Somewhat oddly though not too surprising the behavior for IPv4 only results seems to be no error.
>
> I'd suggest either querying each family separately and only failing when both fail, or keep the existing AF_UNSPEC call and then doing a subsequent AF_INET6 call if err WSANO_DATA is returned by the first call to allow IPv6 only hosts to work.
>
> Here's the redacted config I'm using for reference.
> The endpoint only has an AAAA record. It doesn't have a public IPv4 address.
>
> [Interface]
> PrivateKey = [redacted]
> Address = 10.10.10.3/32, fddd:28fa:bc9a::3/128
> DNS = 192.168.10.1, fddd:28fa:bc9a::1
> MTU = 1328
>
> [Peer]
> PublicKey = [redacted]
> PresharedKey = [redacted]
> AllowedIPs = 10.10.10.0/24, fddd:28fa:bc9a::/64, 192.168.10.0/24, 192.168.20.0/24, fda2:369:f8ec::/60, fda2:369:f8ec:10::/64
> Endpoint = myhost.example.com:12345
>
>


More information about the WireGuard mailing list