You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] macOS ignores profile DNS for ordinary domains when using selective AllowedIPs #129
AmneziaWG profile with a DNS server and selective AllowedIPs
Problem
I want to use the DNS server specified in my profile for all system DNS queries while the tunnel is connected, while keeping selective IP routing.
With WG Tunnel, ordinary domain resolution continues to use the existing system DNS server. The same profile provides the desired DNS behavior in the standard AmneziaWG application.
Steps to reproduce
Import an AmneziaWG profile with a DNS server in [Interface].
Configure selective AllowedIPs that include the DNS server's address, without a default route through the VPN.
Select Settings → DNS settings → Tunnel DNS mode → Default.
Connect the tunnel.
Inspect scutil --dns.
Verify that the profile DNS server is reachable using dig @<profile-dns-address> example.com.
Actual behavior
The profile DNS server is reachable through the tunnel and responds to direct queries.
However, WG Tunnel registers it through /etc/resolver/wgtunnel.search. In scutil --dns, it appears under the domain wgtunnel.search, while the default resolver continues to use the existing system DNS server.
Expected behavior
Please support using the profile DNS servers for all system DNS queries while connected, independently of whether AllowedIPs contains a default route.
An explicit UI option would be sufficient. Selective IP routing should remain available, and disconnecting the tunnel should automatically remove the DNS override.
This is the behavior I expect from using the same profile in AmneziaWG.
Relevant source
WG Tunnel Desktop 2.4.1 depends on Core 1.9.9.
The macOS router passes HasAnyDefaultRoute() to the DNS setup function. Source
Global DNS is configured only when fullTunnel is true and DNS servers are present. Otherwise, WG Tunnel writes a resolver file. Source
The resolver file is named /etc/resolver/wgtunnel.search. Source
AmneziaWG 3.1.4 sets matchDomains = [""] when profile DNS servers are present. Source
The AmneziaWG comparison is based on my experience with the profile and the linked source. A controlled comparison between both applications was not performed during diagnosis.
Activity
fix(macos): respect profile dns on allowed IP split configs
fix: slow tunnel startup on windows and core bump for fixes