I have solved the ipv6 reverse lookup issue based on Mcat12's suggestion above. I am using lede/openwrt based router for DHCP duties and as such have to use conditional forwarding in the DNS section of pihole.
Although the suggestion above was not entirely correct, i did some digging and have come up with this:
Assume your ipv6 ULA-Prefix is fd0a:1234:5678::/48
also assume fd0a:1234:5678::1 is router's ipv6 address
Add an entry into /etc/dnsmasq.d/01-pihole.conf as follows:
Once Mcat12 has a look and replicates what I've done reliably we can finally put this ipv6 hostname resolution thing to bed! Again I am using conditional forwarding option in pihole and my router as my DHCP server so I'm not exactly sure if this will translate well into the pihole as a DHCP server configurations. However it has solved the issue for me in my setup.
It does work somewhat. After 18 or so hours my query logs show one or two ip’s rather than the hostnames. I think the conditional forwarding for IPv6 is not getting the PTR records correctly. The arpa commands are different for IPv6 so possibly need to get corrected within pihole code. I’m going to investigate a little further to see what I can come up with.
I'm finding that for ipv6 hostname resolution you are heavily dependent on your router and/or DHCP server to have the hostnames correctly mapped to the ipv6 of the clients. As such it doesn't always resolve right away and could take some time before the pihole gets the hostnames returned from the router.
Some news here? I run into the same problem. IPv4 hosts are resolved without problems but IPv6 don't. I tried the extra line in a custom dnsmasq.d file but it doesn't work for me. Some other ideas? nslookup doesn't work either.
Depends on your setup. Are you using pihole as DHCP server? I suspect you are not so I’ll tell you what I’m using. DHCP is done by my router which is running LEDE/OpenWrt and the pihole conditional forwarding option with said router. On the router I am using ip6neigh script to update IPv6 hostnames. For me it works perfectly to resolve hostnames for IPv6. As well as the options I’ve outlined above. The problem is conditional forwarding relies on the router to provide the correct hostnames for IPv6 when queried so it’s heavily dependent on the router and or it’s firmware.
Once I get some time I will provide a tutorial to setup for those with lede/OpenWrt and conditional forwarding. I assume those with pihole doing the dhcp have no issues as the pihole always knows the hostnames attaches to the IPv6 addresses as it is providing them in the first place.
I think the problem boils down to the main developers and possibly mods here don’t have or don’t use IPv6 so it’s difficult to have them tweak the code. The pihole would have to keep track of IPv6 addresses and their associated hostnames in a separate discovered hosts log file internally like my router does. Reverse dns for IPv6 does work though it just needs to be coded correctly for queries.