-
Notifications
You must be signed in to change notification settings - Fork 281
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
Fix ipv6 support for DNS servers #695
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Rebased on master locally to test, IPv6 binds without issues.
- Listening ns and rs on both
::1
and a specific ipv6 address (used Tailscale, dns queried from another device) works. - Was curious so looked at Wireshark and ipv4-ns-ipv6-rs and vice versa chosen properly by rs.
- IPv4 behaviour same as before.
But it still needs rebase for tests to pass I think. (And ofc dropping the temp commit)
Once this is merged, I'll try to add binding to multiple addresses/interfaces so nodes can listen on 4 and 6 - discussed on telegram or discord, idr.
I think this PR only enables IPv6, not use it by default when available. Saw the reverted localhost change, this shouldn't be a breaking change since it still defaults to IPv4 127.0.0.1. |
Ok I looked through this all again, here's my current understanding: First of all - the ipv6 setting for unbound ( Next, bns: the default so solution-wise: there is this test in bns which checks for ipv6 access in really the only possible way: try it. But I think relying on a hard-coded external IP address, even a icann dns root server, is sorta problematic. In discussions, Nodar suggested that we trust the user. Meaning, if the user sets |
Requires chjj/bns#33
Inspired by #685 I went looking for other problems with
127.0.0.1
and tried configuring hsd's DNS servers to listen on ipv6 addresses::1
. There were several problems with this that need to be addressed in both bns (see above PR) as well as hsd.The misbehavior can be observed on master branch:
hsd --rs-host=::1
dig @::1 ...
Other combinations will also break such as
hsd --ns-host=::1
and thendig @127.0.0.1 ...
because the recursive resolver (unbound
) thinks ipv6 is false and will just returnSERVFAIL
even though the root name server is happily listening on::1
REVIEWERS: be sure to
rm -rf node_modules && npm i
because this PR pulls in the bns PR