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