OPNsense Forum

English Forums => General Discussion => Topic started by: Hektor on February 07, 2020, 12:19:59 am

Title: WireGuard doesn't start with activated peer without Public Key
Post by: Hektor on February 07, 2020, 12:19:59 am
OPNsense 19.7.10 + 20.1 - just updated.

WireGuard crashes and doesn't start anymore when you add a peer without a public key.

Steps to reproduce:
- Set up WireGuard
- Create a WireGuard peer -> leave the Public Key empty
- Add the peer to the configured WireGuard instance
- Save -> WireGuard seems to crash and will not start anymore until you remove the "empty" peer

Probably it's a WireGuard issue but since I didn't find any logs I'm not sure.

Solution:
- Check if it's a WireGuard issue
- Allow adding valid peers only
- If available: check the WireGuard configuration before applying them and cancel if there's an error
Title: Re: WireGuard doesn't start with activated peer without Public Key
Post by: alfrisch on April 29, 2020, 06:06:01 pm
I see the same problem running wireguard on OPNsense 20.1.5

As Hektor mentioned there are no Log entries and thus this problem is very difficult to debug.

Running `wireguard-go wg0` on the command line eventually reveals the problem in the wg0.config!
Title: Re: WireGuard doesn't start with activated peer without Public Key
Post by: mimugmail on April 29, 2020, 09:10:05 pm
WireGuard doesnt log anything, no matter what the problem is. Can you open a Bug Report in GitHub so i dont forget to fix this?
Title: Re: WireGuard doesn't start with activated peer without Public Key
Post by: alfrisch on May 25, 2020, 02:08:59 pm
I have opened an issue here https://github.com/opnsense/plugins/issues/1850