IPv6 LinkLocal resolution for WebUI / PTR records for IPv6

Expected Behaviour:

DNS Clients using IPv6 should appear with their name obtainable from the DHCP server (external)

Actual Behaviour:

IPv4 name resolution works fine but for IPv6 LinkLocal addresses the resolution is not being performed.


My DHCP server has a script that matches the IPv4 leases to the IPv6 address as follows:
DHCP static lease:

  • MAC address xx:xx:xx:xx:E2:C7
  • IP address 192.168.10.2
  • Name: MainPC
  • Domain: local

The script (ip6neigh) figures out MainPC's IPv6 address and adds the following DNS entries:

  • MainPC.local: 2a02:xxxx::e2c7
  • MainPC.LL.local: fe80::xxxx:e2c7
  • MainPC.TMP.local: 2a02:xxxx:yyyy

PiHole is configured to use this DHCP server for conditional forwarding, and indeed I can see it works by using nslookup and monitoring the queries in pihole (running pihole -t)

I've narrowed it down to the fact that while normal queries work the same whether I'm querying PiHole or the DHCP server, PTR queries only work for IPv4 addresses using PiHole, while they work fine on my DHCP server:

PiHole

C:\Users\Vlad>nslookup
Default Server: UnKnown
Address: fe80::xxxx:4015

> set type=PTR
> 7.c.2.e.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.0.0.0.0.0.8.e.f.ip6.arpa
Server: UnKnown
Address: fe80::xxxx:4015

*** UnKnown can't find 7.c.2.e.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.0.0.0.0.0.8.e.f.ip6.arpa: Non-existent domain
> 7.c.2.e.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.2.0.a.2.ip6.arpa
Server: UnKnown
Address: fe80::xxxx:4015

*** UnKnown can't find 7.c.2.e.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.2.0.a.2.ip6.arpa: Non-existent domain
> 2.10.168.192.in-addr.arpa
Server: UnKnown
Address: fe80::xxxx:4015

2.10.168.192.in-addr.arpa name = MainPC.local
>

DHCP server

C:\Users\Vlad>nslookup - 192.168.10.99
Default Server: OpenWrt.local
Address: 192.168.10.99

> set type=PTR
> 2.10.168.192.in-addr.arpa
Server: OpenWrt.local
Address: 192.168.10.99

2.10.168.192.in-addr.arpa name = MainPC.local
> 7.c.2.e.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.2.0.a.2.ip6.arpa
Server: OpenWrt.local
Address: 192.168.10.99

7.c.2.e.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.2.0.a.2.ip6.arpa name = MainPC.local
> 7.c.2.e.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.0.0.0.0.0.8.e.f.ip6.arpa
Server: OpenWrt.local
Address: 192.168.10.99

7.c.2.e.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.0.0.0.0.0.8.e.f.ip6.arpa name = MainPC.LL.local
>

I can also see that even PiHole's own LinkLocal address is not resolved (query for PTR 5.1.0.4.x.x.x....x.0.8.e.f.ip6.arpa is served with NXDOMAIN)

Debug Token:

q2ihobi0ce

I use the exact setup you have. I've found you need to add "server=/x.x.x.x.x.x.x.x.a.0.d.f.ip6.arpa/fd0a:xxxx:xxxx::1" to the 01-pihole.conf file to get ipv6 name resolution working. Replace the above x's with your IPv6 ULA-Prefix you assigned in openwrt on network/interfaces tab at the bottom.

Note that you have to reverse the address for the ip6.arpa lookup. For example, if your ULA-Prefix is fd0a:1234:5678::/48 - the line would read "server=/8.7.6.5.4.3.2.1.a.0.d.f.ip6.arpa/fd0a:1234:5678::1"

This works for me with opwnwrt and ip6neigh on the router serving dhcp. Don't forget to reboot after you add the line. And another thing, after every pihole update you will have to add the line again as the update wipes it out.

Hope this helps!

1 Like

Thanks, that did the trick - although I don't have ULA addresses and get the LinkLocal addres in the logs
I added server=/0.0.0.0.0.8.e.f.ip6.arpa/192.168.10.99 to /tmp/dnsmasq.d/01-pihole.conf and looks like it's working fine

Could we get PiHole developers to either add a conditional forwarding server for IPv6 addresses OR use the existing conditional fowarding server for fe80::/64 addresses (perhaps also for any detected ULA addresses)?

The request will be seen if a topic is opened in the Feature Request area.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.