wg-quick down not reverting DNS parameters on MacOS
Matteo Franzil
matteofranzil at gmail.com
Thu Aug 10 14:50:30 UTC 2023
Hi!
I extensively searched for any discussion on this bug (or at least, I
hope so), which has been bugging me for a while.
I am a Wireguard user on macOS Ventura (version 13.4.1 (c)), and
installed wireguard via the wireguard-tools (version 1.0.20210914) and
wireguard-go (0.0.20230223) commands on brew.
Assume I have set my DNS servers either via GUI or via DHCP (doesn't
matter how), and I use wg-quick to connect to a wg conf file (also
irrelevant what is the target server).
The moment I:
- use wg-quick to bring up the VPN,
- put my Mac to sleep,
- reopen the lid,
- use wg-quick to stop the VPN,
then DNS servers are not updated back to the original value, and instead
stick to what the previous VPN configuration had commanded.
The workaround is just to verify what DNS servers are set with scutil
--dns and cat /etc/resolv.conf, but editing them is a pain. I often work
with an open VPN and closing the lid without remembering to turn it of
is common.
Let me know if I also need to provide further details.
See also this GitHub issue, which was posted on an unrelated repository
but perfectly matches what I have just said:
https://github.com/StreisandEffect/streisand/issues/1334
Matteo
More information about the WireGuard
mailing list