我需要wg-quick@mullvad-sg2
在重新启动后手动重新启动我的 VPN 服务 ( ) NetworkManager
,以便 DNS 查找正常工作。
如何重新NetworkManager
启动我的 VPN 服务?
答案1
确定需要重新启动的服务NetworkManager
- 在本例中为wg-quick@
.
通过键入以下内容编辑override.conf
for :wg-quick@
sudo systemctl edit wg-quick@
添加以下内容:
[Unit]
# Restart / Stop with NetworkManager
PartOf=NetworkManager.service
# Wait until network is really up before trying to have Wireguard connect
# https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
Requires=NetworkManager-wait-online.service
After=NetworkManager-wait-online.service