Development discussion of WireGuard
 help / color / mirror / Atom feed
* Mac APP DNS Search Domain
@ 2021-07-17 10:09 Sven Auhagen
  2021-08-09 16:12 ` Stephen Larew
  0 siblings, 1 reply; 3+ messages in thread
From: Sven Auhagen @ 2021-07-17 10:09 UTC (permalink / raw)
  To: wireguard

Hi,

the DNS search domain in the Wireguard Mac APP does not seem to work properly.
The search domain is added properly and I can see it in the DNS configuration
for the scoped query:

resolver #2
search domain[0] : mytestdomain.com
nameserver[0] : 192.168.6.1
if_index : 17 (utun4)
flags    : Scoped, Request A records
reach    : 0x00000002 (Reachable)

but the global resolver is using a mix of my LAN and Wireguard DNS resolver:

resolver #1
search domain[0] : sven.lan
nameserver[0] : 192.168.6.1
if_index : 17 (utun4)
flags    : Supplemental, Request A records
reach    : 0x00000002 (Reachable)
order    : 102200

I found a discussion on Github about the issue here:
https://github.com/tailscale/tailscale/issues/101#issuecomment-639286398

suggesting that the following will fix it:

--- a/Sources/WireGuardKit/PacketTunnelSettingsGenerator.swift
+++ b/Sources/WireGuardKit/PacketTunnelSettingsGenerator.swift
@@ -88,7 +88,7 @@ class PacketTunnelSettingsGenerator {
             let dnsSettings = NEDNSSettings(servers: dnsServerStrings)
             dnsSettings.searchDomains = tunnelConfiguration.interface.dnsSearch
             if !tunnelConfiguration.interface.dns.isEmpty {
-                dnsSettings.matchDomains = [""] // All DNS queries must first go through the tunnel's DNS
+                dnsSettings.matchDomains = [""] + dnsSettings.searchDomains // All DNS queries must first go through the tunnel's DNS
             }
             networkSettings.dnsSettings = dnsSettings
         }

I do not have an Apple Developer Account so I am not able to compile the code and test it.
Can anyone take a look as this would be a great help.

Best
Sven



Beste Grüße/Best regards

Sven Auhagen
Dipl. Math. oec., M.Sc.
Voleatech GmbH
HRB: B 754643
USTID: DE303643180
Grathwohlstr. 5
72762 Reutlingen
Tel: +49 7121539550
Fax: +49 71215395599
E-Mail: sven.auhagen@voleatech.de
www.voleatech.de<https://www.voleatech.de>
[https://www.voleatech.de/wp-content/uploads/2021/03/vtair-emailbanner-enterprise.jpg] <https://www.voleatech.de/de/vtair/>
Diese Information ist ausschließlich für den Adressaten bestimmt und kann vertraulich oder gesetzlich geschützte Informationen enthalten. Wenn Sie nicht der bestimmungsgemäße Adressat sind, unterrichten Sie bitte den Absender und vernichten Sie diese Mail. Anderen als dem bestimmungsgemäßen Adressaten ist es untersagt, diese E-Mail zu lesen, zu speichern, weiterzuleiten oder ihren Inhalt auf welche Weise auch immer zu verwenden. Für den Adressaten sind die Informationen in dieser Mail nur zum persönlichen Gebrauch. Eine Weiterleitung darf nur nach Rücksprache mit dem Absender erfolgen. Wir verwenden aktuelle Virenschutzprogramme. Für Schäden, die dem Empfänger gleichwohl durch von uns zugesandte mit Viren befallene E-Mails entstehen, schließen wir jede Haftung aus.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-10  7:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-17 10:09 Mac APP DNS Search Domain Sven Auhagen
2021-08-09 16:12 ` Stephen Larew
2021-08-10  7:42   ` Sven Auhagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).