конфиг на контроллере:
[Interface]
PrivateKey = [ключ пира]
Address = 10.8.0.7/24
PostUp = ip rule add table 200 from 192.168.88.92
PostUp = ip route add table 200 default via 192.168.88.1
PreDown = ip rule delete table 200 from 192.168.88.92
PreDown = ip route delete table 200 default via 192.168.88.1
DNS = [днс работает корректно, проверяю на https://www.dnsleaktest.com/]
[Peer]
PublicKey = [ключ сервера
AllowedIPs = 0.0.0.0/0
Endpoint = [адрес сервера]:51820
Прошу прощения, не разобрался где логи смотреть (по форуму пишут что логи в var\log, но в моем случае отсутвует файл messages…), выкладываю что пишет в терминале:
ручной запуск:
root@wirenboard-A2KR67BZ:~# wg-quick up wg0
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.8.0.7/24 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] resolvconf -a tun.wg0 -m 0 -x
/etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf
[#] wg set wg0 fwmark 51820
[#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820
[#] ip -4 rule add not fwmark 51820 table 51820
[#] ip -4 rule add table main suppress_prefixlength 0
[#] sysctl -q net.ipv4.conf.all.src_valid_mark=1
[#] nft -f /dev/fd/63
/dev/fd/63:5:1-96: Error: Could not process rule: No such file or directory
[#] resolvconf -d tun.wg0 -f
/etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf
[#] ip -4 rule delete table 51820
[#] ip -4 rule delete table main suppress_prefixlength 0
[#] ip link delete dev wg0
При этом, во время данного запроса доходит часть пингов с телефона, подключенного к тому же серверу:
Если запускать по команде systemctl start wg-quick@wg0.service:
root@wirenboard-A2KR67BZ:~# systemctl enable wg-quick@wg0.service
root@wirenboard-A2KR67BZ:~# systemctl start wg-quick@wg0.service
Job for wg-quick@wg0.service failed because the control process exited with error code.
See “systemctl status wg-quick@wg0.service” and “journalctl -xe” for details.
root@wirenboard-A2KR67BZ:~# 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 Fri 2023-03-24 23:19:09 MSK; 30s ago
Docs: man:wg-quick(8)
man:wg(8)
https://www.wireguard.com/
https://www.wireguard.com/quickstart/
wireguard-tools - Required tools for WireGuard, such as wg(8) and wg-quick(8)
wireguard-tools - Required tools for WireGuard, such as wg(8) and wg-quick(8)
Process: 18380 ExecStart=/usr/bin/wg-quick up wg0 (code=exited, status=1/FAILURE)
Main PID: 18380 (code=exited, status=1/FAILURE)
CPU: 1.127s
Mar 24 23:19:04 wirenboard-A2KR67BZ wg-quick[18551]: /dev/fd/63:5:1-96: Error: Could not process rule: No such file or directory
Mar 24 23:19:04 wirenboard-A2KR67BZ wg-quick[18380]: [#] resolvconf -d tun.wg0 -f
Mar 24 23:19:06 wirenboard-A2KR67BZ wg-quick[18579]: /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/reso>
Mar 24 23:19:07 wirenboard-A2KR67BZ wg-quick[18380]: [#] ip -4 rule delete table 51820
Mar 24 23:19:08 wirenboard-A2KR67BZ wg-quick[18380]: [#] ip -4 rule delete table main suppress_prefixlength 0
Mar 24 23:19:08 wirenboard-A2KR67BZ wg-quick[18380]: [#] ip link delete dev wg0
Mar 24 23:19:09 wirenboard-A2KR67BZ systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, status=1/FAILURE
Mar 24 23:19:09 wirenboard-A2KR67BZ systemd[1]: wg-quick@wg0.service: Failed with result ‘exit-code’.
Mar 24 23:19:09 wirenboard-A2KR67BZ systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0.
Mar 24 23:19:09 wirenboard-A2KR67BZ systemd[1]: wg-quick@wg0.service: Consumed 1.127s CPU time.
lines 1-23/23 (END)…skipping…
● 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 Fri 2023-03-24 23:19:09 MSK; 30s ago
Docs: man:wg-quick(8)
man:wg(8)
https://www.wireguard.com/
https://www.wireguard.com/quickstart/
wireguard-tools - Required tools for WireGuard, such as wg(8) and wg-quick(8)
wireguard-tools - Required tools for WireGuard, such as wg(8) and wg-quick(8)
Process: 18380 ExecStart=/usr/bin/wg-quick up wg0 (code=exited, status=1/FAILURE)
Main PID: 18380 (code=exited, status=1/FAILURE)
CPU: 1.127s
Mar 24 23:19:04 wirenboard-A2KR67BZ wg-quick[18551]: /dev/fd/63:5:1-96: Error: Could not process rule: No such file or directory
Mar 24 23:19:04 wirenboard-A2KR67BZ wg-quick[18380]: [#] resolvconf -d tun.wg0 -f
Mar 24 23:19:06 wirenboard-A2KR67BZ wg-quick[18579]: /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf
Mar 24 23:19:07 wirenboard-A2KR67BZ wg-quick[18380]: [#] ip -4 rule delete table 51820
Mar 24 23:19:08 wirenboard-A2KR67BZ wg-quick[18380]: [#] ip -4 rule delete table main suppress_prefixlength 0
Mar 24 23:19:08 wirenboard-A2KR67BZ wg-quick[18380]: [#] ip link delete dev wg0
Mar 24 23:19:09 wirenboard-A2KR67BZ systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, status=1/FAILURE
Mar 24 23:19:09 wirenboard-A2KR67BZ systemd[1]: wg-quick@wg0.service: Failed with result ‘exit-code’.
Mar 24 23:19:09 wirenboard-A2KR67BZ systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0.
Mar 24 23:19:09 wirenboard-A2KR67BZ systemd[1]: wg-quick@wg0.service: Consumed 1.127s CPU time.
Пинги с телефона так же доходят в процессе попытки запуска вторым способом: