# IPv6 LinkLocal resolution for WebUI / PTR records for IPv6

**URL:** <https://discourse.pi-hole.net/t/ipv6-linklocal-resolution-for-webui-ptr-records-for-ipv6/15971>\
**Category:** Help\
**Created:** [January 10, 2019, 10:27am UTC](https://discourse.pi-hole.net/t/ipv6-linklocal-resolution-for-webui-ptr-records-for-ipv6/15971 "2019-01-10T10:27:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vladk2k](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/v/22d042/32.png) [@vladk2k](https://discourse.pi-hole.net/u/vladk2k)\
**Post date:** [January 10, 2019, 10:27am UTC](https://discourse.pi-hole.net/t/ipv6-linklocal-resolution-for-webui-ptr-records-for-ipv6/15971/1 "2019-01-10T10:27:53Z")

</div>

## 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.

 ![image](https://discourse.pi-hole.net/uploads/default/original/2X/9/9002881d66e2d631092c363ae68af2fb39d1f491.png)  
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](https://github.com/AndreBL/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`

---

<div class="post-metadata">

**Author:** ![Ronnick](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/r/74df32/32.png) [@Ronnick](https://discourse.pi-hole.net/u/Ronnick)\
**Post date:** [January 10, 2019, 8:10pm UTC](https://discourse.pi-hole.net/t/ipv6-linklocal-resolution-for-webui-ptr-records-for-ipv6/15971/2 "2019-01-10T20:10:59Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![vladk2k](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/v/22d042/32.png) [@vladk2k](https://discourse.pi-hole.net/u/vladk2k)\
**Post date:** [January 11, 2019, 12:03pm UTC](https://discourse.pi-hole.net/t/ipv6-linklocal-resolution-for-webui-ptr-records-for-ipv6/15971/3 "2019-01-11T12:03:16Z")

</div>

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)?

---

<div class="post-metadata">

**Author:** ![DanSchaper](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/danschaper/32/91_2.png) [@DanSchaper](https://discourse.pi-hole.net/u/DanSchaper)\
**Post date:** [January 11, 2019, 8:16pm UTC](https://discourse.pi-hole.net/t/ipv6-linklocal-resolution-for-webui-ptr-records-for-ipv6/15971/4 "2019-01-11T20:16:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)\
**Post date:** [February 1, 2019, 8:17pm UTC](https://discourse.pi-hole.net/t/ipv6-linklocal-resolution-for-webui-ptr-records-for-ipv6/15971/5 "2019-02-01T20:17:04Z")

</div>

Closed on February 1, 2019, 8:17pm UTC

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