OPNsense Forum

English Forums => Virtual private networks => Topic started by: christianw on May 04, 2022, 08:54:10 AM

Title: [SOLVED] wireguard-go will stop while uplink ist not ready after boot
Post by: christianw on May 04, 2022, 08:54:10 AM
Hi people,

we have the task, that we have an OPNsense VM with wireguard set up.
The OPNsense connects to an wireguard Endpoint (at Internet) through another virtual Router, that builds up the connection through a mesh network.

Now, after reboot of both machines, the virtual router needs "some" time to establish an internet connection. 
OPNsense starts, has no Internet link and wireguard-go stops and never tries again.

We tried to delay the boot of OPNsense, but this is just an insufficient workaround.
Is Monit the way of doing this? Did we miss something?

Regards
Christian

Title: Re: wireguard-go will stop while uplink ist not ready after boot
Post by: zerwes on May 04, 2022, 09:17:18 AM
Is the WG peer configured as IP or DNS?If you use DNS, it might just be a DNS issue and you can try to switch to IP ... in case your peer has a static ip ...WG just resolves DNS on startup, so if it can not do this, it can not start...
Title: Re: wireguard-go will stop while uplink ist not ready after boot
Post by: christianw on May 04, 2022, 11:17:56 AM
Dear zerwes,

thank you for pointing out this detail of DNS handling by wireguard!
We did use DN. I switched to IP now... and will test.




Title: Re: wireguard-go will stop while uplink ist not ready after boot
Post by: christianw on May 05, 2022, 04:51:35 AM
I'm happy. :-) Great!
Thank you!