WireGuard macOS App doesn't set system default DNS

Alexander Skwar alexanders.mailinglists+nospam at gmail.com
Thu Aug 6 15:47:25 CEST 2020

Hello Shulhan

Am Do., 6. Aug. 2020 um 15:18 Uhr schrieb Shulhan <ms at kilabit.info>:
> > On 3 Aug 2020, at 19.14, Alexander Skwar <alexanders.mailinglists+nospam at gmail.com> wrote:
> >
> > Hello Erik,
> >
> > yes, I know that the DNS is private. This is why I have that on my macOS
> > configuration:
> >
> > # …
> > AllowedIPs =,
> > # …
> >
> Did you set DNS servers manually in "Advanced" section? If yes, try to clear it.

No, I haven't set DNS servers in the Advanced section.

> I use macOS too and everything works fine.

Hm. Using the script from https://github.com/myspaghetti/macos-virtualbox/
I created a macOS running in a VirtualBox as a VM. In this VM, I installed
WireGuard and imported my config. The issue could be reproduced.

To make it clear: nothing else, besides WireGuard and the bloat ware from
Apple was installed and the issue exists. This rules out that there is any
conflicting software installed or any bad configuration on my side. It just
leaves macOS and WireGuard.

On my normal (non-VM) system (where I have the same issues), I also
have OpenVPN and the system built-in VPN (IPsec) installed and configured
to use (not so on the VM). These tools are able to set the DNS. So this
also rules out that there's an issue with macOS.

FWIW, "wg-quick" (wireguard-tools) is able to set DNS (but fails to properly
revert, if multiple tunnels had been brought up at the same time - but that's
a different issue).

> Did the DNS server is the same VM as WireGuard server?

No, it's not. And it's not limited to as DNS server, WireGuard
also doesn't set it to e.g. or (OpenNIC). It only sets
it, when AllowedIPs=

My configuration (where WireGuard does NOT set DNS):

PrivateKey = ...=
Address =

PublicKey = ...=
AllowedIPs =
Endpoint = wg.....ch:51820

That WireGuard does NOT set the DNS is also visible in the output of
the "dig" command. Eg.:

alex at Alexanders-MacBook-Pro ~ % dig ct.de

; <<>> DiG 9.10.6 <<>> ct.de

( is the IP of my router; it shows that the default wasn't

When I use AllowedIPs=, the dig output has this line:


Ie. was used as the IP of system DNS.

Thanks again,


More information about the WireGuard mailing list