Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (â‹®) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[SOLVED] Wireguard won't start after update to 6.11.1

Featured Replies

Just updated to 6.11.1 from 6.10.3 and my wireguard tunnels doesn't seem to start? And yes, I did refresh the tunnel configs as instructed in the release notes 🙂

 

My remote clients will start, but only show send activity. Nothing for recieved.

There is a slider in the settings for the tunnel showing "INACTIV". When clicking it it slides to "ACTIVE" and then directly back again.

wg2.thumb.JPG.e8a74fcbd751c3ec0f6249f2a0619173.JPG

 

In the syslog I can see 

Oct 11 11:55:49 XXX wireguard: Tunnel WireGuard-wg1 started 

and nothing else.

 

I also see there is a wg.quick.log file that updates when I updated a tunnel and there I see some errors, but I do not understand what they mean.

wg-quick up wg0 (autostart)
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.253.0.1 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] ip -4 route add 10.253.0.5/32 dev wg0
[#] ip -4 route add 10.253.0.4/32 dev wg0
[#] ip -4 route add 10.253.0.3/32 dev wg0
[#] logger -t wireguard 'Tunnel WireGuard-wg0 started'
[#] iptables -t nat -A POSTROUTING -s 10.253.0.0/24 -o bond0 -j MASQUERADE

wg-quick up wg1 (autostart)
[#] ip link add wg1 type wireguard
[#] wg setconf wg1 /dev/fd/63
[#] ip -4 address add 10.253.1.1 dev wg1
[#] ip link set mtu 1420 up dev wg1
[#] ip -4 route add 10.253.1.4/32 dev wg1
[#] ip -4 route add 10.253.1.3/32 dev wg1
[#] ip -4 route add 10.253.1.2/32 dev wg1
[#] logger -t wireguard 'Tunnel WireGuard-wg1 started'
[#] iptables -t nat -A POSTROUTING -s 10.253.1.0/24 -o bond0 -j MASQUERADE

wg-quick down wg0
[#] ip link delete dev wg0
[#] logger -t wireguard 'Tunnel WireGuard-wg0 stopped'
[#] iptables -t nat -D POSTROUTING -s 10.253.0.0/24 -o bond0 -j MASQUERADE

wg-quick up wg0
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.253.0.1 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] ip -4 route add 10.253.0.5/32 dev wg0
[#] ip -4 route add 10.253.0.4/32 dev wg0
[#] ip -4 route add 10.253.0.3/32 dev wg0
[#] logger -t wireguard 'Tunnel WireGuard-wg0 started'
[#] iptables -t nat -A POSTROUTING -s 10.253.0.0/24 -o eth0 -j MASQUERADE
[#] ip -4 route flush table 200
[#] ip -4 route add default via 10.253.0.1 dev wg0 table 200
[#] ip -4 route add 192.168.xxx.xxx/24 via 192.168.xxx.xxx dev  table 200
Error: either "to" is duplicate, or "200" is a garbage.
[#] ip link delete dev wg0

wg-quick down wg1
[#] ip link delete dev wg1
[#] logger -t wireguard 'Tunnel WireGuard-wg1 stopped'
[#] iptables -t nat -D POSTROUTING -s 10.253.1.0/24 -o bond0 -j MASQUERADE

wg-quick up wg1
[#] ip link add wg1 type wireguard
[#] wg setconf wg1 /dev/fd/63
[#] ip -4 address add 10.253.1.1 dev wg1
[#] ip link set mtu 1420 up dev wg1
[#] ip -4 route add 10.253.1.4/32 dev wg1
[#] ip -4 route add 10.253.1.3/32 dev wg1
[#] ip -4 route add 10.253.1.2/32 dev wg1
[#] logger -t wireguard 'Tunnel WireGuard-wg1 started'
[#] iptables -t nat -A POSTROUTING -s 10.253.1.0/24 -o eth0 -j MASQUERADE
[#] ip -4 route flush table 201
[#] ip -4 route add default via 10.253.1.1 dev wg1 table 201
[#] ip -4 route add 192.168.xxx.xxx/24 via 192.168.xxx.xxx dev  table 201
Error: either "to" is duplicate, or "201" is a garbage.
[#] ip link delete dev wg1

wg-quick down wg1
wg-quick: `wg1' is not a WireGuard interface

wg-quick up wg0
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.253.0.1 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] ip -4 route add 10.253.0.5/32 dev wg0
[#] ip -4 route add 10.253.0.4/32 dev wg0
[#] ip -4 route add 10.253.0.3/32 dev wg0
[#] logger -t wireguard 'Tunnel WireGuard-wg0 started'
[#] iptables -t nat -A POSTROUTING -s 10.253.0.0/24 -o eth0 -j MASQUERADE
[#] ip -4 route flush table 200
[#] ip -4 route add default via 10.253.0.1 dev wg0 table 200
[#] ip -4 route add 192.168.xxx.xxx/24 via 192.168.xxx.xxx dev  table 200
Error: either "to" is duplicate, or "200" is a garbage.
[#] ip link delete dev wg0

wg-quick down wg0
wg-quick: `wg0' is not a WireGuard interface

wg-quick up wg0
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.253.0.1 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] ip -4 route add 10.253.0.5/32 dev wg0
[#] ip -4 route add 10.253.0.4/32 dev wg0
[#] ip -4 route add 10.253.0.3/32 dev wg0
[#] logger -t wireguard 'Tunnel WireGuard-wg0 started'
[#] iptables -t nat -A POSTROUTING -s 10.253.0.0/24 -o eth0 -j MASQUERADE
[#] ip -4 route flush table 200
[#] ip -4 route add default via 10.253.0.1 dev wg0 table 200
[#] ip -4 route add 192.168.xxx.xxx/24 via 192.168.xxx.xxx dev  table 200
Error: either "to" is duplicate, or "200" is a garbage.
[#] ip link delete dev wg0

wg-quick down wg0
wg-quick: `wg0' is not a WireGuard interface

wg-quick up wg1
[#] ip link add wg1 type wireguard
[#] wg setconf wg1 /dev/fd/63
[#] ip -4 address add 10.253.1.1 dev wg1
[#] ip link set mtu 1420 up dev wg1
[#] ip -4 route add 10.253.1.4/32 dev wg1
[#] ip -4 route add 10.253.1.3/32 dev wg1
[#] ip -4 route add 10.253.1.2/32 dev wg1
[#] logger -t wireguard 'Tunnel WireGuard-wg1 started'
[#] iptables -t nat -A POSTROUTING -s 10.253.1.0/24 -o eth0 -j MASQUERADE
[#] ip -4 route flush table 201
[#] ip -4 route add default via 10.253.1.1 dev wg1 table 201
[#] ip -4 route add 192.168.xxx.xxx/24 via 192.168.xxx.xxx dev  table 201
Error: either "to" is duplicate, or "201" is a garbage.
[#] ip link delete dev wg1

wg-quick down wg1
wg-quick: `wg1' is not a WireGuard interface

wg-quick up wg0
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.253.0.1 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] ip -4 route add 10.253.0.5/32 dev wg0
[#] ip -4 route add 10.253.0.4/32 dev wg0
[#] ip -4 route add 10.253.0.3/32 dev wg0
[#] logger -t wireguard 'Tunnel WireGuard-wg0 started'
[#] iptables -t nat -A POSTROUTING -s 10.253.0.0/24 -o eth0 -j MASQUERADE
[#] ip -4 route flush table 200
[#] ip -4 route add default via 10.253.0.1 dev wg0 table 200
[#] ip -4 route add 192.168.xxx.xxx/24 via 192.168.xxx.xxx dev  table 200
Error: either "to" is duplicate, or "200" is a garbage.
[#] ip link delete dev wg0

wg-quick down wg0
wg-quick: `wg0' is not a WireGuard interface

wg-quick down wg0
wg-quick: `wg0' is not a WireGuard interface

wg-quick up wg0
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.253.0.1 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] ip -4 route add 10.253.0.5/32 dev wg0
[#] ip -4 route add 10.253.0.4/32 dev wg0
[#] ip -4 route add 10.253.0.3/32 dev wg0
[#] logger -t wireguard 'Tunnel WireGuard-wg0 started'
[#] iptables -t nat -A POSTROUTING -s 10.253.0.0/24 -o eth0 -j MASQUERADE
[#] ip -4 route flush table 200
[#] ip -4 route add default via 10.253.0.1 dev wg0 table 200
[#] ip -4 route add 192.168.xxx.xxx/24 via 192.168.xxx.xxx dev  table 200
Error: either "to" is duplicate, or "200" is a garbage.
[#] ip link delete dev wg0

wg-quick down wg0
wg-quick: `wg0' is not a WireGuard interface

wg-quick down wg0
wg-quick: `wg0' is not a WireGuard interface

wg-quick down wg1
wg-quick: `wg1' is not a WireGuard interface

wg-quick up wg0
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.253.0.1 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] ip -4 route add 10.253.0.5/32 dev wg0
[#] ip -4 route add 10.253.0.4/32 dev wg0
[#] ip -4 route add 10.253.0.3/32 dev wg0
[#] logger -t wireguard 'Tunnel WireGuard-wg0 started'
[#] iptables -t nat -A POSTROUTING -s 10.253.0.0/24 -o eth0 -j MASQUERADE
[#] ip -4 route flush table 200
[#] ip -4 route add default via 10.253.0.1 dev wg0 table 200
[#] ip -4 route add 192.168.xxx.xxx/24 via 192.168.xxx.xxx dev  table 200
Error: either "to" is duplicate, or "200" is a garbage.
[#] ip link delete dev wg0

wg-quick down wg0
wg-quick: `wg0' is not a WireGuard interface

wg-quick up wg1
[#] ip link add wg1 type wireguard
[#] wg setconf wg1 /dev/fd/63
[#] ip -4 address add 10.253.1.1 dev wg1
[#] ip link set mtu 1420 up dev wg1
[#] ip -4 route add 10.253.1.4/32 dev wg1
[#] ip -4 route add 10.253.1.3/32 dev wg1
[#] ip -4 route add 10.253.1.2/32 dev wg1
[#] logger -t wireguard 'Tunnel WireGuard-wg1 started'
[#] iptables -t nat -A POSTROUTING -s 10.253.1.0/24 -o eth0 -j MASQUERADE
[#] ip -4 route flush table 201
[#] ip -4 route add default via 10.253.1.1 dev wg1 table 201
[#] ip -4 route add 192.168.xxx.xxx/24 via 192.168.xxx.xxx dev  table 201
Error: either "to" is duplicate, or "201" is a garbage.
[#] ip link delete dev wg1

wg-quick down wg1
wg-quick: `wg1' is not a WireGuard interface
Spoiler

 

 

Solved by tetrapod

I do not use Wireguard, so I am not sure it is relevant for your situation but there was a mention of Wireguard in the release notes for 6.11.1

Did you check that ?

 

 

 

  • Author

Yes, it is relevant, but I did perform the "Users are advised to regenerate the WG configs" as instructed. I included that information in my description, but mayby I wasn't clear enough.

Thank you anyways for responding

  • Author

Still have this problem and made some more tests. Tried deleting peers and set up new, but have the same problems so I deleted all tunnels and started anew.

 

test05.1.thumb.JPG.b9088d23ead18ee6d493eb0798004542.JPG

 

I can start this tunnel which add these lines to wg-quick.log

wg-quick down wg0
wg-quick: `/etc/wireguard/wg0.conf' does not exist

 

But it does exist. Looks like this:

[Interface]
#test05
PrivateKey=ANoWVzWStD+5FBt3OoeOv4UDhDEayUDwd6n43ZmLr0M=
Address=10.253.0.1
ListenPort=51820
PostUp=logger -t wireguard 'Tunnel WireGuard-wg0 started'
PostUp=iptables -t nat -A POSTROUTING -s 10.253.0.0/24 -o eth0 -j MASQUERADE
PostDown=logger -t wireguard 'Tunnel WireGuard-wg0 stopped'
PostDown=iptables -t nat -D POSTROUTING -s 10.253.0.0/24 -o eth0 -j MASQUERADE

 

And I can start it, which add these lines to wg-quick.log

wg-quick up wg0
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.253.0.1 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] logger -t wireguard 'Tunnel WireGuard-wg0 started'
[#] iptables -t nat -A POSTROUTING -s 10.253.0.0/24 -o eth0 -j MASQUERADE

 

Ok, so a tunnel seems to be up, but when I add a peer it goes wrong and the tunnel goes from ACTIVE to INACTIVE

test05.2.thumb.JPG.ea17bb7b2eb4bb8ea908bfeff7e078f5.JPG

I see this added in the wg-quick.log

wg-quick down wg0
[#] ip link delete dev wg0
[#] logger -t wireguard 'Tunnel WireGuard-wg0 stopped'
[#] iptables -t nat -D POSTROUTING -s 10.253.0.0/24 -o eth0 -j MASQUERADE

wg-quick up wg0
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.253.0.1 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] ip -4 route add 10.253.0.2/32 dev wg0
[#] logger -t wireguard 'Tunnel WireGuard-wg0 started'
[#] iptables -t nat -A POSTROUTING -s 10.253.0.0/24 -o eth0 -j MASQUERADE
[#] ip -4 route flush table 200
[#] ip -4 route add default via 10.253.0.1 dev wg0 table 200
[#] ip -4 route add 192.168.100.0/24 via 192.168.100.1 dev  table 200
Error: either "to" is duplicate, or "200" is a garbage.
[#] ip link delete dev wg0

 

What is the table 200 problem here? Is there a wg0 missing in the second route add? Seems to be double space there?

 

Any pointers would be apriciated - hanging on by a thread here with the server in questions far away in a different country. Also posting my diagnostics

diagnostics-20221013-1053.zip

  • Author
  • Solution

This is driving me nuts and I think I have figured it out. At least I can get it work, but maybe I do not understand all the implications.

 

In the file /etc/wireguard/wg0.conf there is this line

PostUp=ip -4 route add 192.168.100.0/24 via 192.168.100.1 dev  table 200

 

The same line that throws the error in wg-quick.log

[#] ip -4 route add 192.168.100.0/24 via 192.168.100.1 dev  table 200
Error: either "to" is duplicate, or "200" is a garbage.

 

I refreched some knowledge about routing in Linux and I don't think the "dev " (notice the extra space) should be there.

If I edit /etc/wireguard/wg0.conf and remove "dev " the tunnel can stay started and there is no error in wg-quick.log

PostUp=ip -4 route add 192.168.100.0/24 via 192.168.100.1 table 200

 

This solution works and are stable for starting/stopping the tunnel. If I however add a peer or update a peer, the config is overwritten with the "dev " in the line and it needs to be edited again.

 

I have only tested this for "remote access to server" and have not changed anything from default values.

 

Why do I have this problem? I saw the upgrade note that you should refresh Wireguard tunnels to get it to work. So there is an issue with Wireguard, but somehow my system/setup is different.

 

I'll guess this is a workarond for now and maybe someone else can give a +1 if they had the same?

  • tetrapod changed the title to (WORKAROUND) Wireguard won't start after update to 6.11.1

I have the same problem. I have even deleted the tunnel/peers and started from scratch. The workaround works. WG on Unraid is not very stable... :(

  • Author
On 10/18/2022 at 8:32 PM, ercoppa said:

I have the same problem. I have even deleted the tunnel/peers and started from scratch. The workaround works. WG on Unraid is not very stable... :(

Well, when WG is running it is very stable. Extremely so imho. To me it seems the error lies with UnRAID's WG config implementation in 6.11.1. I think it's an easy fix but we prabably need to wait for 6.11.2 for that.
The workaround is stable

  • Author
13 hours ago, ljm42 said:

Thank you for providing a solution.

However, I applied this without thinking :-$ Not your fault, but I think I cut of the branch I'm sitting on. Got to the [Apply] and then lost communication with the server that is four country boarders north of me. I have a remote access to monitor and power button through a PiKVM, but I'm afraid to order a reboot. Do not know what I could have changed to make this happen?!?
I shouldn't have changed anything when hitting [Apply]. But maybe I did? I (think) I chnged one of the top Yes/No switches - something "* binding" - from Yes to No and then back again befor hitting [Apply]. Could that have changes something else? Can I check a settings file somewhere?

3 hours ago, tetrapod said:

Thank you for providing a solution.

However, I applied this without thinking :-$ Not your fault, but I think I cut of the branch I'm sitting on. Got to the [Apply] and then lost communication with the server that is four country boarders north of me. I have a remote access to monitor and power button through a PiKVM, but I'm afraid to order a reboot. Do not know what I could have changed to make this happen?!?
I shouldn't have changed anything when hitting [Apply]. But maybe I did? I (think) I chnged one of the top Yes/No switches - something "* binding" - from Yes to No and then back again befor hitting [Apply]. Could that have changes something else? Can I check a settings file somewhere?

 

The good news is that with the PiKVM you'll always have access to the console, so if it doesn't join the network properly after rebooting you can login, type "rm /boot/config/network.cfg" and then type "reboot", Unraid will generate a default networking config when it boots back up. Assuming you have DHCP you should be good at that point, although you'll need to make a dummy change and hit Apply again to get past the bug we're talking about here.

 

Still, let's see if anyone else in the community has a better idea on how to recover.

 

  • Author
4 hours ago, tetrapod said:

Thank you for providing a solution.

However, I applied this without thinking :-$ Not your fault, but I think I cut of the branch I'm sitting on. Got to the [Apply] and then lost communication with the server that is four country boarders north of me. I have a remote access to monitor and power button through a PiKVM, but I'm afraid to order a reboot. Do not know what I could have changed to make this happen?!?
I shouldn't have changed anything when hitting [Apply]. But maybe I did? I (think) I chnged one of the top Yes/No switches - something "* binding" - from Yes to No and then back again befor hitting [Apply]. Could that have changes something else? Can I check a settings file somewhere?

Back up again thanks to reboot via PiKVM (prais be it's name). Waiting for 6.11.2 before I touch anything more with network involved.

VPN was now able to start without any changes to the config file. Marking the issue as solved

  • tetrapod changed the title to [SOLVED] Wireguard won't start after update to 6.11.1
2 hours ago, tetrapod said:

Back up again thanks to reboot via PiKVM (prais be it's name)

 

I really do like the PiKVM, great little box.  Glad you are back up and running!

  • Author
On 10/21/2022 at 5:53 PM, ljm42 said:

...type "rm /boot/config/network.cfg" and then type "reboot", Unraid will generate a default networking config when it boots back up. Assuming you have DHCP you should be good at that point...

 

That's really good to know - thank you.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.