-
Notifications
You must be signed in to change notification settings - Fork 759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unbound: external IPv6 DNS Servers are sometimes passed to client but should not #2822
Comments
|
Under system: settings: general there was a bug with the the dns checkbox options. I suspect you see the same and simply saving the page again would fix it. It was in 18.7.4. If not the issue is a bit weird, it should never publish external servers, no matter if Unbound is running or not since it only checks the enabled flag. But it could be a side effect of IPv6 not having fully reloaded. |
|
Found it... https://github.com/opnsense/core/blob/master/src/etc/inc/services.inc#L338 Dhcpv6 probably has a similar defect. The question is: should we avoid pushing servers in this case altogether? |
|
So, we need to do a few things it seems:
|
|
While fc3ec19 addresses the issue, there's no easy way to test this on 18.7.5 due to a few (potentially) conflicting changes, but I'll provide a clean backport later... :) |
So when configuring radvd for a certain interface, it checks whether a DNS server is enabled (Unbound or DNSMasq) for the interface. If so, the IP address of the interface is pushed, else the list of external DNS servers. All for IPv6 only, though.
In general, this sound the reasonable thing to do. But why does it follow the else branch? In my case, Unbound is enabled and DNSMasq is not. Does enabled mean running or configured to run? In my case it could also be that Unbound stops from time to time (crash?). Still unclear why the program flow enters Another observation (may be related or not): radvd spits out
about 5 to 10 times per minute. |
|
I'm not sure what you are saying. The code line does what you described as faulty, but also explains it completely: when no IPv6 has been found, it skips to the configured servers -- likely not to break DNS resolution for clients. The issues are that: a) we shouldn't serve clients if we don't have an IP address yet The code is wrong in assuming it should continue to the next else. |
|
Sorry, your comments and my comment crossed each other. I understand what you explained. No further comment. |
|
Ah ok, sorry for the overlap :) |
|
Can you try this patch 749f7f7 for 18.7.5? |
|
Patch applied. Will not be able to report back before next week, though. |
|
No problem. Thanks in advance. |
|
The issue did not appear during the last two days. I am tempted to say that the problem is solved. I suggest to close the issue. I will reopen if the issue reappears. |
|
@borisneubert thanks for the feedback. I have a minor issue at one office deployment during reboot, but I'll look at it next week and leave this open for now. |
|
Today, the issue occurred again. I had to reboot the FritzBox that conveys the internet connection. After the FritzBox came back and provided a new IPv6 prefix to the OPNSense box, the latter propagated the IPv6 addresses of the Google webservers again to my workstation. |
|
A number of changes on master now, test patch was a silly early proposal. Circled back to preventing DHCPv6 start when the IPv6 is not there, which makes the code clearer. Still worried about RADVD leaking the servers too, little harder to pull it off there. To be continued... |
|
I stand corrected. There's a commit in tomorrow's 18.7.7 that is more to the point of your described issue than the previous test commit mentioned: 86be9ca#diff-23f22aca2e953811c28d5b034d367737R1251 What it may not do is reload, so while the servers are not leaked, it will give out no servers whatsoever. As said initially, the issue is tricky and I still don't understand the code past that introduced this issue back in 2012 for no apparent reason. |
|
@borisneubert how's 18.7.7 treating you then? :) |
|
Sweet. No leaking of the OPNsense box's DNS servers in everyday work so far. Right now, tried to provoke the issue by restarting the upstream cable modem (Fritzbox) and observing the output of To complete the test, I restarted the cable modem again and watched the output of Looks good to me. |
|
Perfect, will close then. Thanks for the report and testing! 👍 |
this is the relevant configuration of opnsense box:
OPNsense 18.7.4-amd64
DHCPv6 is off
DNSmasq DNS is off
Unbound DNS is on, in Forwarding Mode, local zone type= transparent
Settings | General | DNS servers: set to Google IPv4 and IPv6 webservers
My Ubuntu 18.04 workstation is set to static IPv4. IPv6 is autoconfigured (opnsense box internal network "home" tracks WAN).
During the last months I have seen the following behavior on my workstation:
When the issue is present,
systemd-resolve --statuson the workstation gives (shortened):Here is a log extract from when this issue occured: unbound has stopped working at 12:35:28 (last log entry) for no reason and does not come back to live.
system.logshows the following:I suspect that this behavior occurs when the external IP address of the opnsense box changes (DSLight Unitymedia cable connection).
Restarting unbound seems to solve the issue. But sometimes it is also necessary to force the workstation to clear the list of nameservers and request them again from the OPNsense box.
The text was updated successfully, but these errors were encountered: