Thanks, that rules out both of my DNS-related guesses.
In particular, the fact that restarting Unbound does not help, while restarting the inbound WireGuard instance does, strongly suggests that the problem is not DNS itself but the runtime state of the WireGuard interface after boot.
Also, I would not necessarily assume that your two observations have the same cause:
1. "Configuring WireGuard" taking a long time during boot may well be caused by S2S peers whose endpoints have to be resolved. That is to be expected, because the DNS of the endpoints is not yet resolvable and only gets corrected on first run of the cron job.
2. The C2S clients being unable to use the firewall itself as DNS afterwards is probably a separate problem with the C2S WireGuard interface not being initialized correctly.
So I would compare the actual WireGuard state before and after restarting the inbound instance.
While the problem exists, please show:
Then restart only the affected inbound WireGuard instance and show the same three commands again.
In particular, check whether the configured tunnel IP address of the firewall is actually present on `wgX` in the broken state. If that address is missing or wrong, it would explain the symptoms very nicely: routed traffic through the tunnel may still work, while DNS to the firewall's own WG address cannot.
Another useful test while it is broken would be:
If the DNS packets arrive on `wgX`, we know that the tunnel itself transports them and can concentrate on local delivery/interface configuration instead of DNS.
At this point I would first look at the before/after difference rather than try another workaround.
In particular, the fact that restarting Unbound does not help, while restarting the inbound WireGuard instance does, strongly suggests that the problem is not DNS itself but the runtime state of the WireGuard interface after boot.
Also, I would not necessarily assume that your two observations have the same cause:
1. "Configuring WireGuard" taking a long time during boot may well be caused by S2S peers whose endpoints have to be resolved. That is to be expected, because the DNS of the endpoints is not yet resolvable and only gets corrected on first run of the cron job.
2. The C2S clients being unable to use the firewall itself as DNS afterwards is probably a separate problem with the C2S WireGuard interface not being initialized correctly.
So I would compare the actual WireGuard state before and after restarting the inbound instance.
While the problem exists, please show:
Code Select
ifconfig wgX
wg show wgX
netstat -rn -f inet
Then restart only the affected inbound WireGuard instance and show the same three commands again.
In particular, check whether the configured tunnel IP address of the firewall is actually present on `wgX` in the broken state. If that address is missing or wrong, it would explain the symptoms very nicely: routed traffic through the tunnel may still work, while DNS to the firewall's own WG address cannot.
Another useful test while it is broken would be:
Code Select
tcpdump -ni wgX port 53
and then try a DNS lookup from the client.If the DNS packets arrive on `wgX`, we know that the tunnel itself transports them and can concentrate on local delivery/interface configuration instead of DNS.
At this point I would first look at the before/after difference rather than try another workaround.
"