OpenVPN or Wireguard tutorial?

Thanks, this could well explain it.
Without WireGuard, the internet connection works fine and time is updated. I suspect the wg0 connection is too quick ; how can I add some delay before it launches to allow time to be updated?

Edit the service file, after remote.fs.target, Since i’m guessing you want WG up before mediacenter starts? (if i remember correctly)

Hi
Thank you for the ideas; what is this service file you are refering to?

The idea is actually to delay wireguard by a minute or two upon boot, maybe Sam could confirm but I assume that would allow osmc to update the time before starting to launch wireguard. The issue being that internet won’t work at all with a broken wireguard (due to wrong time) connection so I have to manually drop it.

Thanks for the ideas, much appreciated

Wireguard just needs the interface to be up and an IP assigned to it. So Wait for network is what should be enough.

I’ve Wireguard working on several systems now and don’t see any need (WiFi or Wired) to interfere with boot up.

I am just enabling the wgquick parameterised systemd target and that’s it.

1 Like

Thanks. Then something else must be wrong. I’ll continue digging when I get the Vero4K+ back into action, for now I have to “down” the wg0 using terminal, let it “do its thing” (update date/time), and then I can either “up” the wg0 or simply reboot for all to work.

Does this tunnel have very high latency or something? My tunnel is about 100ms ping away and it connects perfectly every time.

Sam

I don’t think so. The device is packed away for now but I’ll resume testing next weekend. Both home and secondary location are on FTTH and the vero is very responsive, 1080p high bitrate videos load fine… I’ll check latency with ping but I don’t think that is an issue. I had assumed the incorrect date/time would prevent the wireguard from connecting but maybe that’s just a wrong assumption. The Vero4K is completely unplugged so it loses track of date/time.

When it boots it will keep the date and time since the last shutdown, so it won’t be completely off the mark. This may be helping.

Can certainly advise how to introduce a delay but I am still not sure it is necessary.

Well I unplug the thing for weeks literally ; when it boots up initial date and time are way-off!
Indeed a few minutes or even an hour won’t block my VPNs most of the time on my computers, but we’re on a different timescale here.

It may be worth trying to rule out that hypothesis. I have no other idea at this stage.

I’ll also try inducing minor delay, i.e. switching it off (and unplugging it) for a few minutes/an hour and seeing if it runs fine upon boot or not.