Vpn

是否可以在 WireGuard VPN 客戶端中禁用預設網關?

  • October 17, 2020

是否可以在 WireGuard VPN 客戶端中禁用預設網關?我對自己的子網使用了“允許的 IP”,但是每當我嘗試連接到 VPN 伺服器時,客戶端都會將預設網關設置為 WireGuard 伺服器 IP。

在 WireGuard 中禁用預設網關的任何其他方法?

而不是指定AllowedIPs = 0.0.0.0/0指定一個 IP 地址。

遇到這個問題,想知道同樣的事情。此處詳述的案例為我指明了正確的方向:https ://emanuelduss.ch/2018/09/wireguard-vpn-road-warrior-setup/

我用過systemdnetdev此處設置https://www.freedesktop.org/software/systemd/man/systemd.netdev.html#%5BWireGuard%5D%20Section%20Options>不會為您創建路由表條目。您需要在此處手動添加它<https://www.freedesktop.org/software/systemd/man/systemd.network.html#%5BNetwork%5D%20Section%20Options。我允許所有 IP,但僅將特定流量路由到 wg 介面。

如果使用wg-quick,您可能需要Table=off根據https://manpages.debian.org/unstable/wireguard-tools/wg-quick.8.en.html進行更改

引用自:https://serverfault.com/questions/961833