Quote from: hfvk on April 30, 2026, 07:01:25 PMQuote from: franco on April 21, 2026, 09:44:17 PMOk fair so what happens when /usr/local/opnsense/scripts/wireguard/reresolve-dns.py is manually invoked without the workaround in place?
Cheers,
Franco
OK, tested this now on OPNsense 26.1.6-amd64
Wireguard site-to-site setup.
Router A has router B configured as a peer and endpoint address is a FQDN.
Router B has router A configured as a peer and endpoint address is a FQDN.
"Renew DNS for WireGuard on stale connections" --> is enabled and run periodically
--> cron entry: enabled * * * * * "Renew DNS for WireGuard on stale connections"
Step 1: disabled the workaround on both site-to-site routers (A and B)
--> workaround was the delayed restart (60 second delay) of Wireguard after system bootup to ensure that DNS is working when tunnel is restarted.
--> site-to-site tunnel is working at this point
Step 2: restart router A
--> wireguard tunnel starts properly as router A boots up
--> note that router B has not been restarted
Step 3: restart router B
--> wireguard site-to-site tunnel won't start on router B due to DNS resolve issues (Name does not resolve).
--> site-to-site tunnel is down
Step 4: manually invoke /usr/local/opnsense/scripts/wireguard/reresolve-dns.py on router B
--> tunnel is still down
--> no feedback from CLI and no log entry in Wireguard log
Step 5: manually invoke /usr/local/opnsense/scripts/wireguard/reresolve-dns.py on router A
--> tunnel is still down
--> no feedback from CLI and no log entry in Wireguard log
Step 6: restart Wireguard S2S on router A
--> tunnel is still down
Step 7: restart Wireguard S2S on router B
--> tunnel comes up and traffic flows
Any ideas how to debug this further?
I just tested this on OPNsense 26.1.7-amd64 as well. The behavior is exactly the same. The only way to get the tunnel online after rourter B restart is either
1) setup a script to perform delayed tunnel restart on router B after startup or
2) manually restart the tunnel on router B
"