Настройка wireguard-go на vps с openvz (ubuntu 22.04)
Пытался сначала настроить wireguard, который должен на уровне ядра linux работать, но не получилось из-за openvz. Хост использует какое-то свое кастомное ядро версии 3.10.0-1160.25.1.vz7.180.2 без модулей wireguard'a.
Погуглил, нашел реализацию wireguard-go на которой построены клиенты для macos и windows. Делал все по гайдам: 1. https://d.sb/2019/07/wireguard-on-openvz-lxc 2. https://www.reddit.com/r/WireGuard/comments/dze220/wireguard_on_ubuntu_1804_o...
После попытки первого запуска службы systemctl start wg-quick@wg0 выдает:
Job for wg-quick@wg0.service failed because the control process exited with error code.
See "systemctl status wg-quick@wg0.service" and "journalctl -xeu wg-quick@wg0.service" for details.
systemctl status wg-quick@wg0.service
× wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0
Loaded: loaded (/lib/systemd/system/wg-quick@.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2022-08-06 14:05:26 MSK; 12min ago
Docs: man:wg-quick(8)
man:wg(8)
https://www.wireguard.com/
https://www.wireguard.com/quickstart/
https://git.zx2c4.com/wireguard-tools/about/src/man/wg-quick.8
https://git.zx2c4.com/wireguard-tools/about/src/man/wg.8
Process: 780 ExecStart=/usr/bin/wg-quick up wg0 (code=exited, status=1/FAILURE)
Main PID: 780 (code=exited, status=1/FAILURE)
Aug 06 14:05:26 se9c58735.fastvps-server.com wg-quick[788]: │ https://www.wireguard.com/install/ │
Aug 06 14:05:26 se9c58735.fastvps-server.com wg-quick[788]: │ │
Aug 06 14:05:26 se9c58735.fastvps-server.com wg-quick[788]: └──────────────────────────────────────────────────────┘
Aug 06 14:05:26 se9c58735.fastvps-server.com wg-quick[788]: ERROR: (wg0) 2022/08/06 14:05:26 Failed to create TUN device: CreateTUN("wg0") failed; /dev/net/tun does not exist
Aug 06 14:05:26 se9c58735.fastvps-server.com wg-quick[794]: Unable to access interface: Protocol not supported
Aug 06 14:05:26 se9c58735.fastvps-server.com wg-quick[780]: [#] ip link delete dev wg0
Aug 06 14:05:26 se9c58735.fastvps-server.com wg-quick[795]: Cannot find device "wg0"
Aug 06 14:05:26 se9c58735.fastvps-server.com systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, status=1/FAILURE
Aug 06 14:05:26 se9c58735.fastvps-server.com systemd[1]: wg-quick@wg0.service: Failed with result 'exit-code'.
Aug 06 14:05:26 se9c58735.fastvps-server.com systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0.
Если выполнить wg-quick up wg0:
[#] ip link add wg0 type wireguard
RTNETLINK answers: Operation not supported
[!] Missing WireGuard kernel module. Falling back to slow userspace implementation.
[#] wireguard-go wg0
┌──────────────────────────────────────────────────────┐
│ │
│ Running wireguard-go is not required because this │
│ kernel has first class support for WireGuard. For │
│ information on installing the kernel module, │
│ please visit: │
│ https://www.wireguard.com/install/ │
│ │
└──────────────────────────────────────────────────────┘
ERROR: (wg0) 2022/08/06 14:25:13 Failed to create TUN device: CreateTUN("wg0") failed; /dev/net/tun does not exist
Unable to access interface: Protocol not supported
[#] ip link delete dev wg0
Cannot find device "wg0"
В чем может быть проблема? Пытался гуглить эту ошибку, мало чего понял.