Dynamic dns through dnsmasq only works for IPv4

Hello,

I am trying to dynamically create DNS records for the hosts i connect to my network, based on the DHCP leases. I enabled that functionality in the dnsmasq configuration, and forward the DNS requests from kresd to dnsmasq. However, I only get replies for the IPv4 addresses of my hosts, and not for the IPv6 addresses. Is there some extra configuration that is needed to also get AAAA records?

dnsmasq correctly reports IPv6 addresses when i assign them statically through /etc/hosts.

I have a Turris Omnia with TurrisOS version 5.1.2

edit: Forgot to mention that if i make a DNS query for the router, then a fd00 address is returned.

It’s “known” that only IPv4 addresses are “transplanted” from DHCP to DNS, at least in the default supported set up: add support for odhcpd & ipv6 in dhcp_host_domain_ng.py (#311) · Issues · Turris / Turris OS / Turris OS packages · GitLab

/etc/hosts is not put into the DNS service by default. (Of course it still affects DNS resolution on the router itself.) It’s relatively easy to configure that: Turris Documentation

Some people on the forum configure their dnsmasq to serve DNS on a non-standard port and then instruct kresd (the default DNS daemon) to forward some subtrees (e.g. **.lan and some **.arpa) to that port. Some other people replace kresd by dnsmasq for DNS. I think none of those options are really officially supported.

For the record (and to satisfy my interest), what are your use cases for this? – meaning IPv6 addresses in DNS from local DHCP assignments

I must admit I don’t even have an idea where “name of the router” could come from and how it would get into DNS (or what it would be on my routers).

Hello and thank you for the quick response.

Yes, i think that’s what I am doing. DNS from dnsmasq is on a non-standard port and kresd is redirecting queries for my local domain to dnsmasq.

So from what I understand the “normal” state is to only have IPv4 for DNS records from DHCP, and for now I can’t do much about it.

Well, as you might have guessed I am pretty much a complete noob when it comes to building a home network. As such I am trying to learn by doing. When I came across this dynamic DNS functionality I wanted to implement it in my network and I just thought that IPv6 should also be available. Since I didn’t know of that issue you mention, I assumed I did something wrong with the config and was trying to fix it. But other than that, I don’t have a specific use case yet, other than to learn.

To be clear, “turris” is the hostname of my router, and I get a AAAA record for turris.localdomain

Yes, I’d call it a missing feature perhaps.

For me all the practical advantages of IPv6 are tied to the WAN side and wider internet, mainly reachability of services over IPv6 and ability to provide them that way (as IPv4 addresses are relatively expensive nowadays), and none of those advantages can really utilize local DNS modifications. So that’s why I’m personally curious about particular use cases. (The information may also inform prioritization of that missing feature.)

Oh, I’m sorry for misleading you, it probably won’t work. I forgot that DHCPv6 is provided by a different daemon than dnsmasq. Some people did use the approach but I don’t think it’s possible get IPv6 bindings from dnsmasq.