我正在尝试在 Ubuntu 20.04 中设置 wireguard VPN。我执行以下操作:
sudo cp wgIoffeVPN2smirnovdm.conf /etc/wireguard/wg0.conf
sudo wg-quick up wg0
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 172.16.245.37/24 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] resolvconf -a tun.wg0 -m 0 -x
[#] ip -4 route add 194.85.224.0/20 dev wg0
[#] ip -4 route add 172.16.0.0/16 dev wg0
[#] ip -4 route add 10.0.0.0/8 dev wg0
它似乎有效:
sudo wg show wg0
interface: wg0
public key: Rh4CnAexQbBJ2hBueYwkzoElFLoYumKFsQqKId02hUk=
private key: (hidden)
listening port: 37273
peer: A7LH7h/xDlLwfwtnPdGE8Lwe9sF5xW66k/Yrd/uTOxk=
endpoint: 194.85.224.5:44886
allowed ips: 172.16.0.0/16, 194.85.224.0/20, 10.0.0.0/8
latest handshake: 23 seconds ago
transfer: 92 B received, 1.28 MiB sent
persistent keepalive: every 25 seconds
但是我无法在浏览器中打开任何网站,也没有 ping :
ping google.com
ping: google.com: Temporary failure in name resolution
相同的配置文件在 Mac 和 Android 上均可完美运行。Ubuntu 可能存在什么问题?