[Interface]
# emit configs ......
# Commands to clear DNS on macOS, otherwise DNS will not work after disable VPN!
# https://ivans.io/wireguard-on-macos/
POSTDOWN = if [ -x /usr/sbin/networksetup ]; then /usr/sbin/networksetup -setdnsservers Wi-Fi "Empty"; fi
[Peer]
# emit other configuration....
Originally created by @ryan4yin on GitHub (Jul 17, 2023).
Run this command after disable VPN fix this problem:
```shell
sudo /usr/sbin/networksetup -setdnsservers Wi-Fi "Empty"
```
or add it into wireguard config:
```conf
[Interface]
# emit configs ......
# Commands to clear DNS on macOS, otherwise DNS will not work after disable VPN!
# https://ivans.io/wireguard-on-macos/
POSTDOWN = if [ -x /usr/sbin/networksetup ]; then /usr/sbin/networksetup -setdnsservers Wi-Fi "Empty"; fi
[Peer]
# emit other configuration....
```
Related:
- [Fixing DNS for Wireguard on MacOS](https://ivans.io/wireguard-on-macos/)
adam
added the bug label 2025-12-29 04:20:33 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @ryan4yin on GitHub (Jul 17, 2023).
Run this command after disable VPN fix this problem:
or add it into wireguard config:
Related: