Right, there’s an issue in the default priorities of the various rules in Knot Resolver, so that you don’t get reverse local hints by default. For IPv4 I would do it by adding this single line:
IPv6 has a problem on a different layer which would have to be fixed first – the script that gathers data from DHCP is for IPv4 only, so kresd doesn’t even know about the local IPv6 addresses. (I expect it’s related to IPv6 doing this very differently, even in different daemon IIRC.)
Even what I posted is a hacky fix that does a mild breakage of internet standards. Over long term we certainly want to fix this, but I don’t know if that would be soon. BTW, I’m curious – what’s your particular use case for these reverse mappings?
Well, to be honest I am probably just a perfectionist
But my current use case is tracking of wi-fi devices in the network. I receive events and MAC from hostapd, then I resolve it into IP address (IPv4 currently) using arp cache and then resolve it into hostname using nslookup. I know I could do that without dns and arp by parsing /tmp/dhcp.leases, but I am using a script that is already written by someone else.
I hit this issue too, I needed it to help my home setup to work. I’m using a NAS that is a kerberos controller + NFSv4 server. I was not able to access my NFS share from clients unless the server was able to get the reverse DNS record. I’m not sure it’s mandatory.