Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Virtual private networks
»
[Wireguard] Name does not resolve - only on reboot
« previous
next »
Print
Pages: [
1
]
Author
Topic: [Wireguard] Name does not resolve - only on reboot (Read 959 times)
andre_x
Newbie
Posts: 13
Karma: 0
[Wireguard] Name does not resolve - only on reboot
«
on:
February 01, 2024, 03:30:05 pm »
I've setup a Wireguard VPN that works.
Today we had 2 blackout and both the time the VPN didn't connect automatically to the endpoint.
I've checked and in the logs I see
Code:
[Select]
Name does not resolve
. If i disable and enable back the endpoint, it works.
So it seems that after Opnsense restarts it's not able to resolve a public DNS and WG doesn't retry.
How can I solve this problem?
Thanks!
Logged
franco
Administrator
Hero Member
Posts: 17628
Karma: 1607
Re: [Wireguard] Name does not resolve - only on reboot
«
Reply #1 on:
February 01, 2024, 03:34:50 pm »
Make DNS more reliable? It appears to be querying a server that isn't able to resolve yet...
Cheers,
Franco
Logged
andre_x
Newbie
Posts: 13
Karma: 0
Re: [Wireguard] Name does not resolve - only on reboot
«
Reply #2 on:
February 01, 2024, 04:02:09 pm »
Probably the Internet connection isn't up yet (the vDSL modem is slow).
Why WG doesn't retry?
«
Last Edit: February 01, 2024, 04:14:02 pm by andre_x
»
Logged
franco
Administrator
Hero Member
Posts: 17628
Karma: 1607
Re: [Wireguard] Name does not resolve - only on reboot
«
Reply #3 on:
February 01, 2024, 04:26:06 pm »
The internet connection is up in the post-connect hook (newwanip), but the DNS server it's going to query is not. No idea where and how you resolve DNS but usually that's an issue when you try to query an internal server for an external answer right at the moment the edge device got the connectivity, which means the internal server may not have it yet.
This doesn't happen when you have DNS resolution going through localhost out to the Internet.
Case in point:
https://github.com/opnsense/plugins/issues/3186#issuecomment-1905263283
Cheers,
Franco
Logged
andre_x
Newbie
Posts: 13
Karma: 0
Re: [Wireguard] Name does not resolve - only on reboot
«
Reply #4 on:
February 01, 2024, 04:38:08 pm »
Well...I've just realized that I didn't setup any DNS :| OPS!
Thanks!
Logged
franco
Administrator
Hero Member
Posts: 17628
Karma: 1607
Re: [Wireguard] Name does not resolve - only on reboot
«
Reply #5 on:
February 01, 2024, 04:57:27 pm »
There's no way it was DNS
Cheers,
Franco
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Virtual private networks
»
[Wireguard] Name does not resolve - only on reboot