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
Have a VPN that uses "split tunnel", i.e. not all traffic goes over VPN
"Scoped" DNS that requires DNS queries to some domains to go over the VPNs DNS server
In the client configuration file, you can configure this like this:
[Interface]
DNS = 192.168.1.5,example.org,example.com
...
[Peer]
AllowedIPs = 192.168.1.0/24, ....
This means that all DNS queries that are for the *.example.org or *.example.com domain MUST go to the 192.168.1.5 DNS server. All queries for other domains should go to the DNS resolver that was configured on the system before the VPN got up, i.e. the one provided by WiFi network or ethernet. On macOS all queries go to the 192.168.1.5 server once connected, and not to the "system" DNS any longer.
On Linux (NetworkManager) it works exactly like it should. On Windows, a query is sent to all DNS servers, which is technically not correct, but at least it works.
This is most likely an upstream WireGuard issue that should also be fixed there...
It seems scutil --dns shows it as being correctly configured.
The text was updated successfully, but these errors were encountered:
DNS — a comma-separated list of IP (v4 or v6) addresses to be set as the interface's DNS servers, or non-IP hostnames to be set as the interface's DNS search domains.
To clarify search domains vs match domains: If we seat search domains as ["example.com"], it means that if we need to resolve "abc", the resolver should try to resolve "abc.example.com" first; If we set match domains as ["example.com"], it means only "example.com" and "*.example.com" queries should go to this resolver.
WireGuardKit (see PacketTunnelSettingsGenerator.swift) sets the wg-quick DNS hostnames as search domains, consistent with the man page. It sets match domains as [""], which makes all queries go through the tunnel's DNS resolver first. I don't think there's a way to specify match domains in a wg-quick config.
I don't think there's a way to specify match domains in a wg-quick config.
Is this something that should be added (upstream)? It seems like an important feature to have so you are not leaking your DNS queries to all configured DNS servers?
ghost
changed the title
No support for "match domains" to send queries to right resolves
No support for "match domains" to send queries to right resolvels
Sep 19, 2023
ghost
changed the title
No support for "match domains" to send queries to right resolvels
No support for "match domains" to send queries to right resolvers
Sep 19, 2023
Scenario:
In the client configuration file, you can configure this like this:
This means that all DNS queries that are for the
*.example.org
or*.example.com
domain MUST go to the192.168.1.5
DNS server. All queries for other domains should go to the DNS resolver that was configured on the system before the VPN got up, i.e. the one provided by WiFi network or ethernet. On macOS all queries go to the192.168.1.5
server once connected, and not to the "system" DNS any longer.On Linux (NetworkManager) it works exactly like it should. On Windows, a query is sent to all DNS servers, which is technically not correct, but at least it works.
This is most likely an upstream WireGuard issue that should also be fixed there...
It seems
scutil --dns
shows it as being correctly configured.The text was updated successfully, but these errors were encountered: