我今天刚刚安装了 Ubuntu 来运行WireGuard
然后我按照他们的 Ubuntu 安装说明进行操作。
sudo add-apt-repository ppa:wireguard/wireguard
sudo apt-get update
sudo apt-get install wireguard-dkms wireguard-tools
Run Code Online (Sandbox Code Playgroud)
不幸的是,他们的“快速入门”是什么,但是......
$ ip link add dev wg0 type wireguard
RNETLINK answers: Operation not supported
Run Code Online (Sandbox Code Playgroud)
我检查了标题,检查了更新等。没有骰子。
我有一台运行 Ubuntu 18.04 LTS 的 VPS 服务器,我想在其中安装 WireGuard VPN 服务。我已经开始添加存储库,然后安装运行良好且没有任何错误消息的模块。
add-apt-repository ppa:wireguard/wireguard
apt-get update
apt-get install wireguard-dkms wireguard-tools
Run Code Online (Sandbox Code Playgroud)
然后,我想使用加载内核模块
sudo modprobe wireguard
Run Code Online (Sandbox Code Playgroud)
但是,modprobe告诉我,它无法找到内核模块。
modprobe: ERROR: ../libkmod/libkmod.c:514 lookup_builtin_file() could not open builtin file '/lib/modules/4.15.0/modules.builtin.bin'
modprobe: FATAL: Module wireguard not found in directory /lib/modules/4.15.0
Run Code Online (Sandbox Code Playgroud)
重新阅读控制台输出,安装程序告诉我它已将模块安装到/lib/modules/4.15.0-62-generic/updates/dkms,但modprobe似乎只查看/lib/modules/4.15.0/. 我已经尝试在 4.15.0 目录中创建符号链接,但modprobe仍然无法找到模块文件。
Ubuntu 服务器是“开箱即用”的,因为我正在更新它。有谁能帮忙吗?
我已经运行了 12 个 WireGuard VPN 服务器。现在我想使用一个应用程序来管理客户端上的连接。在我的 Arch-Linux 客户端上,我network-manager-wireguard运行了插件并且工作正常。
是否有适用于 Ubuntu 的 WireGuard GUI?
我正在运行 Ubuntu 20.04 并且已经尝试自己编译这个https://github.com/max-moser/network-manager-wireguard,但是我在运行期间遇到了以下错误./autogen.sh:
checking for LIBNM_GLIB... no
configure: error: Package requirements (NetworkManager >= 1.2.0
libnm-util >= 1.2.0
libnm-glib >= 1.2.0
libnm-glib-vpn >= 1.2.0) were not met:
No package 'NetworkManager' found
No package 'libnm-util' found
No package 'libnm-glib' found
No package 'libnm-glib-vpn' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set …Run Code Online (Sandbox Code Playgroud) Ubuntu 20.10。尝试修复分割连接的 DNS(用于工作的 Wireguard VPN 和用于其他所有内容的公共链接),但在 NetworkManager+systemd 解析的设置中陷入困境。
问题是我需要对通过 Wireguard 链接(仅限于单个域)的任何查询禁用 DNS-over-TLS。
/etc/systemd/resolved.conf似乎只允许全局设置。因此,当我在那里启用 DNS over TLS 时,它对于我的wireguard 链接也处于活动状态。
我可以使用 手动关闭 Wireguard 链接resolvectl dnsovertls wg0 no,但每次重新启动 systemd-resolved 时,它都会重新打开。
如果我理解正确的话,systemd-resolved 的每个链接设置是由 NetworkManager 管理的。但是 NetworkManager 的关键文件( /etc/NetworkManager/system-connections/中的文件)似乎没有 dns over tls 的设置。
我怎样才能让这个设置持续存在?
我今天运行了更新和升级,但无法启动 WireGuard:
$ sudo wg-quick up wg0
[#] ip link add wg0 type wireguard
Error: Unknown device type.
Unable to access interface: Protocol not supported
Run Code Online (Sandbox Code Playgroud)
清除并重新安装 WireGuard 会导致:
Setting up wireguard-dkms (1.0.20200429-2~18.04) ...
Loading new wireguard-1.0.20200429 DKMS files...
Building for 5.3.0-53-generic
Building initial module for 5.3.0-53-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/wireguard-dkms.0.crash'
Error! Bad return status for module build on kernel: 5.3.0-53-generic (x86_64)
Consult /var/lib/dkms/wireguard/1.0.20200429/build/make.log for more information.
Setting up wireguard-tools (1.0.20200513-1~18.04) ...
wg-quick.target is a disabled …Run Code Online (Sandbox Code Playgroud) 首先:这不是重复的。除了 OpenVPN 或 IPSec 之外,我已经尝试了所有方法。我收到客户端和服务器之间的握手,并且客户端之间可以使用 SSH 和 Ping,但我无法访问全球互联网,甚至无法访问服务器的公共 IP。我的配置只是通常的键、端点,我完全遵循 Linode 指南。我的客户端是 openSUSE,但我的服务器是 ubuntu,我认为这是瓶颈。
在 Ubuntu 20.04 (Focal) 上,我能够使用此问题中概述的说明通过常规 Gnome VPN 管理来管理我的 WireGuard VPN 连接。然而,这在 22.04 (Jammy) 中不再起作用。该插件构建得很好,我可以导入我的配置文件(如果我使用 则可以wg-quick up,所以我不认为这是配置文件问题),并且新的 VPN 配置出现在 VPN 列表中。但是,尝试激活它会导致“网络连接激活失败”并且无法与服务器建立连接。
这是尝试连接时的系统日志:
Apr 26 10:33:53 eins NetworkManager[628]: <info> [1650990833.9975] vpn[0x5579356748a0,9f61621d-bde7-4714-a668-84cb5fec16b0,"wg0"]: starting wireguard
Apr 26 10:33:53 eins NetworkManager[628]: <info> [1650990833.9987] audit: op="connection-activate" uuid="9f61621d-bde7-4714-a668-84cb5fec16b0" name="wg0" pid=57075 uid=1000 result="success"
Apr 26 10:33:54 eins NetworkManager[59112]: [#] ip link add wg0 type wireguard
Apr 26 10:33:54 eins NetworkManager[59112]: [#] wg setconf wg0 /dev/fd/63
Apr 26 10:33:54 eins NetworkManager[628]: <info> [1650990834.0255] manager: (wg0): …Run Code Online (Sandbox Code Playgroud) 您好,我是 ubuntu 的新手,我在大约 6 个月前安装了wireguard,并且运行良好,直到昨天我的 ubuntu 更新时,wirguard 不想出现,并给出以下状态:
May 31 08:41:03 lenovo systemd[1]: Starting WireGuard via wg-quick(8) for wg0...
May 31 08:41:03 lenovo wg-quick[5463]: [#] ip link add wg0 type wireguard
May 31 08:41:03 lenovo wg-quick[5463]: Error: Unknown device type.
May 31 08:41:03 lenovo wg-quick[5463]: Unable to access interface: Protocol not supported
May 31 08:41:03 lenovo wg-quick[5463]: [#] ip link delete dev wg0
May 31 08:41:03 lenovo wg-quick[5463]: Cannot find device "wg0"
May 31 08:41:03 lenovo systemd[1]: wg-quick@wg0.service: Main process …Run Code Online (Sandbox Code Playgroud) 我的wireguard 设置有问题。设置完成后,我可以连接到我的设备。握手没问题,但我无法访问互联网和局域网。
设备:树莓派 4b 8gb RAM 操作系统:Ubuntu 服务器 ARM x64 20.04 LTS
我的 wg0.conf 文件内容
[Interface]
Address = 10.0.0.1/24
ListenPort = 51820
PrivateKey = (hidden)
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
[Peer]
PublicKey = oqL4CC4Y572iOvVtpDbASiajjgJPAjJhDODffMezcxA=
PresharedKey = (hidden)
AllowedIPs = 10.0.0.2/32
[Peer]
PublicKey = a6z779DYdezo/TMLbC7AJuenHpseaIqUr/gRx97D4Rw=
PresharedKey = (hidden) …Run Code Online (Sandbox Code Playgroud) 我使用的是安装了 Windows Subsystem for Linux (WSL) 的 Ubuntu 终端环境。版本是 Ubuntu 20.04.1 LTS (GNU/Linux 4.4.0-18362-Microsoft x86_64)。按照各个站点的说明在我的 WIndows 10 PC 上设置 Wireguard VPN 服务器,我发出以下命令:
systemctl enable wg-quick@wg0.service
systemctl start wg-quick@wg0.service
Run Code Online (Sandbox Code Playgroud)
这会导致以下错误消息:
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down.
Run Code Online (Sandbox Code Playgroud)
我花了几天时间进行研究,现在对如何继续感到非常困惑。谁能帮帮我吗。