odhcpd: supports rewrite DNS server to local IPv6 DNS server in relay mode#323
odhcpd: supports rewrite DNS server to local IPv6 DNS server in relay mode#323jjm2473 wants to merge 1 commit intoopenwrt:masterfrom
Conversation
a98479e to
3e2bdd5
Compare
… mode My ISP provides IPv6 DNS servers in RA. In odhcpd relay mode, internal network devices use the IPv6 DNS server advertised by the ISP, causing internal DNS requests to bypass OpenWRT's DNS server. Therefore, relay mode needs to support rewriting the DNS server. Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
3e2bdd5 to
c974605
Compare
|
@Alphix @systemcrash can you take a look at this? |
|
This is a low-cost fix, but the initial post and commit message need rewriting to support the commit's reasoning. It's possible to have dnsmasq capture everything on port (8)53 and send that upstream via DoH or whatever, but this might not be viable for everyone. Maybe something like: In odhcpd RA/DHCPv6 relay mode, downstream network devices receive the upstream IPv6 DNS. This commit enables overriding the DNS server in relay modes (with the exception of authenticated DHCPv6), whereby the local device is substituted as the DNS server. Since |
|
I was wrong. If Line 329 in 650a5df |
|
Should we first enable LuCI to support configuring |
I haven't looked into this in detail yet, but there's (from the top of my head) two options that are relevant. One is if My main concern is not whether this makes sense...I agree that being able to override the ISP's DNS servers is desirable. It's more about what the cfg should look like and how it should behave, both in LuCI and in the cfg files. (and forgive me if I missed something simple here...I haven't looked into the relevant parts of the code, I'm busy with other hacks) |
|
Hi @jjm2473 have you given this some more thought? |
|
Hi @systemcrash : This patch has another issue: it only overrides DNS provided by the upstream RA/DHCPv6. If the upstream RA/DHCPv6 itself doesn't provide DNS, then the downstream won't receive IPv6 DNS (it will generally fall back to IPv4 DNS). Actually, for me, as long as it overridden the DNS provided by the ISP, even completely deleting it is fine, because the ISP-provided DNS allows OpenWrt's DNS to be bypassed by clients, which is the most important issue. |
Just like server mode.
My ISP provides IPv6 DNS in the RA. In odhcpd relay mode, internal network devices use the IPv6 DNS advertised by the ISP, causing internal DNS requests to bypass OpenWRT's DNS server. Therefore, relay mode needs to support overriding the DNS server.
In relay mode,
dns_serviceis false by default, so this change doesn't affect the original logic. A future PR will be given to LuCI to allow modification ofdns_servicein relay mode.