IPv6, dnsmasq and local resolution don't get along

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
foobarfoo
DD-WRT Novice


Joined: 12 Sep 2008
Posts: 26

PostPosted: Mon Oct 03, 2022 4:13    Post subject: IPv6, dnsmasq and local resolution don't get along Reply with quote
I have no problems with local network DNS resolution for local hosts on IPv4, but I can't seem to get IPv6 local DNS resolution to work. I get my IPv6 network allocation from my ISP, and with it gets set the IPv6 DNS servers that are on the IPv6 tab. Those IPv6 name servers always override dnsmasq local name resolution and I can't figure out how to fix it.

I'm using 'DHCPv6 with Prefix Delegation' to get my IPv6 range from Xfinity, but I have Cloudflare DNS set up in 'Static DNS 1' and 'Static DNS 2'. If I don't set nameservers here, IPv6 doesn't seem to work.

I know I'm missing something basic, and I haven't been able to find it anywhere in the forums.
Sponsor
HalfBit
DD-WRT Guru


Joined: 04 Sep 2009
Posts: 776
Location: AR, USA

PostPosted: Wed Oct 26, 2022 17:44    Post subject: Reply with quote
I'm no expert in IPv6 with DD-WRT or otherwise. I'm trying to learn more myself after taking IPv6 training at work and would like to help if I can. I'm not clear on what you're trying to do so I am going to try to restate and you can confirm if I am correct.

Are you trying to set local IPv6 DNS servers on your client so you can perform local DNS queries?

If so, would something like this work in the Additional DNSMasq Options textbox under the Services>Services tab?
Code:
dhcp-option=option6:dns-server,[2001:db8::1:53],[2001:db8::2:53]

_________________
R7000 Nighthawk - DD-WRT v3.0-r50308
R7000 Nighthawk - DD-WRT v3.0-r50308
~~~~~~~~~~Dismantled for learning opportunities~~~~~~~~~~
WRT54Gv2
WRT54Gv8.2
~~~~~~~~~~Other Settings~~~~~~~~~
https://nextdns.io/?from=2d3sq39x
https://pi-hole.net/
https://github.com/DNSCrypt/dnscrypt-proxy
WCBonner
DD-WRT Novice


Joined: 15 Mar 2009
Posts: 17

PostPosted: Wed Nov 02, 2022 18:30    Post subject: Re: IPv6, dnsmasq and local resolution don't get along Reply with quote
foobarfoo wrote:
I have no problems with local network DNS resolution for local hosts on IPv4, but I can't seem to get IPv6 local DNS resolution to work. I get my IPv6 network allocation from my ISP, and with it gets set the IPv6 DNS servers that are on the IPv6 tab. Those IPv6 name servers always override dnsmasq local name resolution and I can't figure out how to fix it.

I'm using 'DHCPv6 with Prefix Delegation' to get my IPv6 range from Xfinity, but I have Cloudflare DNS set up in 'Static DNS 1' and 'Static DNS 2'. If I don't set nameservers here, IPv6 doesn't seem to work.

I know I'm missing something basic, and I haven't been able to find it anywhere in the forums.


When you say local name resolution over IPv6, are you referring to a host with the name myhost.local or something else?

I've learned that there are several ways IPv6 can be configured on DDWRT, the primary way being either with radvd running OR using dnsmasq sending out router advertisement messages and the clients configuring themselves using SLAAC based on the RA messages. A picture or complete description of your IPv6 page in DDWRT would better explain your configuration.
userrox
DD-WRT Novice


Joined: 11 May 2019
Posts: 16

PostPosted: Fri Nov 11, 2022 5:03    Post subject: Reply with quote
I would check what addresses are present in the RDNSS section of the router advertisement, the radvdump tool run from a dd-wrt terminal works even if dnsmasq is generating the RAs. If the only addresses present are for cloudflare then that will explain why you can't find local network resources via DNS queries sent via IPv6. I don't have an equivalent setup to you, instead I have smartdns enabled in the services page so the auto-generated /tmp/dnsmasq.conf gets the following lines:-
server=127.0.0.1#6053
no-resolv

The no-resolv ignores any addresses in /etc/resolv.conf so you need to ensure they get into the dnsmasq configuration file as server= entries or if you use smartdns or similar into the appropriate upstream utility's configuration file.
To ensure you advertise your dd-wrt router's address in the RDNSS section of the RA (and also available via DHCPv6) setup your option6 dns-server value. To provide clients with the global address on the lan interface use the [::] value, I think by default it sends a link-local address

dhcp-option=option6:dns-server,[::]

I think if you specify multiple dns-server addresses here your clients will sometimes go directly to the Internet for DNS instead of to dnsmasq first. If you have a Windows client running ipconfig /all lists all the DNS addresses
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum