Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
24.1 Legacy Series
»
Wireguard not working after reboot
« previous
next »
Print
Pages: [
1
]
Author
Topic: Wireguard not working after reboot (Read 1858 times)
Firewire
Newbie
Posts: 9
Karma: 0
Wireguard not working after reboot
«
on:
April 04, 2024, 07:32:07 pm »
Hello,
since a few OPNsense versions now, I discovered that my Wireguard VPN tunnel is not coming up after a reboot automatically. After restarting my OPNsense shows no active connection via "VPN -> WireGuard -> Status"
Workaround:
To solve the issue until the next reboot, I have to manually disable and enable the WireGuard instance via "VPN -> WireGuard -> Instances"
My guess:
The issue might be related to my WAN uplink, probably the service tries one connection only and it fails since my WAN link is not up yet. The service does not seem to try it again after the WAN link is up and the WireGuard instance keeps being down.
Does someone have an idea how to fix this?
I'm running the latest OPNsense 24.1.5_1 version.
Kind regards
Logged
Firewire
Newbie
Posts: 9
Karma: 0
Re: Wireguard not working after reboot
«
Reply #1 on:
April 04, 2024, 10:13:56 pm »
The issue happened in earlier versions and was fixed:
https://forum.opnsense.org/index.php?topic=34949.0
https://forum.opnsense.org/index.php?topic=18956.0
Is it possible the issue came back with 24.1.5?
The issue is reproducable in my case, my WireGuard link does not go up after a reboot until I click "Apply".
Logged
schmuessla
Newbie
Posts: 49
Karma: 1
Re: Wireguard not working after reboot
«
Reply #2 on:
April 04, 2024, 10:38:58 pm »
Do you connect to your Endpoint via DNS or via IP address?
If DNS try to switch to IP if possible. At boot DNS resolution might not yet be available causing the interface creation to fail.
That's not a problem with IPs configured.
Logged
Firewire
Newbie
Posts: 9
Karma: 0
Re: Wireguard not working after reboot
«
Reply #3 on:
April 05, 2024, 07:47:04 pm »
The endpoint is configured via DNS entry.
I'm not sure how I could replace it with IPs, since the domain resolves multiple IP adresses via nslookup.
Is there some workaround for this specific issue, where a DNS entry can be used as endpoint?
Logged
franco
Administrator
Hero Member
Posts: 17665
Karma: 1611
Re: Wireguard not working after reboot
«
Reply #4 on:
April 05, 2024, 09:48:29 pm »
It heavily depends on your DNS resolving chain. If the DNS is not able to query when the WAN comes up it will fail to bring it up when WAN connects. It's as simple as that.
Cheers,
Franco
Logged
Firewire
Newbie
Posts: 9
Karma: 0
Re: Wireguard not working after reboot
«
Reply #5 on:
April 06, 2024, 11:00:32 am »
After following this thread:
https://forum.opnsense.org/index.php?topic=32232.0
I enabled a Cron job with action "Renew DNS for WireGuard on stale connections" that runs every minute.
After rebooting my OPNsense multiple times, the connection worked every time.
Let me check if this fixes my issue on a long run, gonna report back.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
24.1 Legacy Series
»
Wireguard not working after reboot