Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error #339

Open
CraftedCat opened this issue Aug 1, 2022 · 4 comments
Open

error #339

CraftedCat opened this issue Aug 1, 2022 · 4 comments
Assignees

Comments

@CraftedCat
Copy link

Ubuntu 18.04

cat /etc/wireguard/wg0.conf

PostUp = sysctl --write net.ipv4.ip_forward=1; sysctl --write net.ipv6.conf.all.forwarding=1; nft add table inet wireguard-wg0; nft add chain inet wireguard-wg0 wireguard_chain {type nat hook postrouting priority srcnat;}; nft add rule inet wireguard-wg0 wireguard_chain oifname ens3 masquerade

root@vps:~# sysctl --write net.ipv4.ip_forward=1; sysctl --write net.ipv6.conf.all.forwarding=1; nft add table inet wireguard-wg0; nft add chain inet wireguard-wg0 wireguard_chain {type nat hook postrouting priority srcnat;}; nft add rule inet wireguard-wg0 wireguard_chain oifname ens3 masquerade
net.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding = 1
Error: syntax error, unexpected string, expecting - or number
add chain inet wireguard-wg0 wireguard_chain {type nat hook postrouting priority srcnat;}
^^^^^^
Error: NAT is only supported for IPv4/IPv6
add rule inet wireguard-wg0 wireguard_chain oifname ens3 masquerade
^^^^^^^^^^

@CraftedCat
Copy link
Author

CraftedCat commented Aug 2, 2022

Ok., fresh install:

Created symlink /etc/systemd/system/multi-user.target.wants/wg-quick@wg0.service → /lib/systemd/system/wg-quick@.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.
Synchronizing state of unbound.service with SysV service script with /lib/systemd/systemd-sysv-install.

root@EKL:~# journalctl -xe | grep wg Aug 02 06:58:32 EKL systemd[1]: Created slice system-wg\x2dquick.slice. -- Subject: Unit system-wg\x2dquick.slice has finished start-up -- Unit system-wg\x2dquick.slice has finished starting up. Aug 02 06:58:32 EKL systemd[1]: Starting WireGuard via wg-quick(8) for wg0... -- Subject: Unit wg-quick@wg0.service has begun start-up -- Unit wg-quick@wg0.service has begun starting up. Aug 02 06:58:32 EKL wg-quick[29023]: [#] ip link add wg0 type wireguard Aug 02 06:58:32 EKL wg-quick[29023]: [#] wg setconf wg0 /dev/fd/63 Aug 02 06:58:32 EKL wg-quick[29023]: [#] ip -4 address add 10.0.0.1/8 dev wg0 Aug 02 06:58:32 EKL wg-quick[29023]: [#] ip -6 address add fd00:00:00::1/8 dev wg0 Aug 02 06:58:32 EKL wg-quick[29023]: [#] ip link set mtu 1420 up dev wg0 Aug 02 06:58:32 EKL wg-quick[29023]: [#] sysctl --write net.ipv4.ip_forward=1; sysctl --write net.ipv6.conf.all.forwarding=1; nft add table inet wireguard-wg0; nft add chain inet wireguard-wg0 wireguard_chain {type nat hook postrouting priority srcnat\;}; nft add rule inet wireguard-wg0 wireguard_chain oifname eth0 masquerade Aug 02 06:58:32 EKL wg-quick[29023]: net.ipv4.ip_forward = 1 Aug 02 06:58:32 EKL wg-quick[29023]: net.ipv6.conf.all.forwarding = 1 Aug 02 06:58:32 EKL wg-quick[29023]: Error: syntax error, unexpected string, expecting - or number Aug 02 06:58:32 EKL wg-quick[29023]: add chain inet wireguard-wg0 wireguard_chain {type nat hook postrouting priority srcnat;} Aug 02 06:58:32 EKL wg-quick[29023]: ^^^^^^ Aug 02 06:58:32 EKL wg-quick[29023]: [#] ip link delete dev wg0 Aug 02 06:58:33 EKL systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, status=1/FAILURE Aug 02 06:58:33 EKL systemd[1]: wg-quick@wg0.service: Failed with result 'exit-code'. Aug 02 06:58:33 EKL systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0. -- Subject: Unit wg-quick@wg0.service has failed -- Unit wg-quick@wg0.service has failed. root@EKL:~#

root@EKL:~# nft --version nftables v0.8.2 (Joe Btfsplk) root@EKL:~# uname -a Linux EKL 4.15.0-166-generic #174-Ubuntu SMP Wed Dec 8 19:07:44 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux root@EKL:~#

@Claud
Copy link

Claud commented Jun 19, 2023

I have the same problem

2023-06-19 17_25_08-master@vps9254_ ~

2023-06-19 17_28_37-master@vps9254_ ~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@Claud @CraftedCat and others