Misleading Hostnames when using IPv6

I have enabled IPv6 in my network (DHCPv6 is done by Unifi UDM) and it seems that all clients are not just using their original hostname but also a IPv6 name.
e.g. "blue.ip" and "p2000....t-ipconnect.de"

This makes it impossible to see which client is doing what as the logs are always referring to the long IPv6 name.
Looking in the network section I can see that both names are recognised by pihole.

Expected Behaviour:

The manually assigned Hostname shall be used and logged

Actual Behaviour:

The additional IPv6 hostname is used and logged

Debug Token:

https://tricorder.pi-hole.net/jm339sbbcz

You are observing the expected behaviour for reverse-resolution of a public client IPv6 address.
Your ISP owns the IPv6 address space it has assigned to you and is thus handling DNS for it as well.

As it is a client's decision how to pick the IP address it uses to issue DNS requests to Pi-hole, there is nothing you can configure on Pi-hole's side (at least as long as IPv6 Privacy Extensions are used by your clients).

Instead, you'd have to configure each of your clients and/or your router to change that (see e.g. Using pihole as DHCP server but ipv6 address showing in logs - #6 by Bucking_Horn for a non-comprehensive choice of options).

There is no possibility to set a "leading" hostname if one device (as defined by MAC) does have multiple hostnames. However, Pi-hole has the ability to define "alias-clients" which combine multiple IP-clients.

A word of warning: there is no GUI to define the alias-clients and you need to get familiar with SQL a bit. Also I recommend to read the whole thread as the definition and database commands have changed during the development.

I use the fe80: IPv6 address as dns for my lan networks, then all clients come up whit normal hostnames.

I have been using the alias client feature for a while now, a word of warning. The only place this actually has an impact on the web interface, is the dashboard, there you will see, if configured correctly, the alias client name, a single entry for what otherwise be multiple entries from the same client, and if you hover over the name, the alias client id. However, if you click on the client name, which is a link to the queries view for that specific client, it will show an empty result. Same thing for the query log view and the long term data view, the alias client name isn't used there.

It's very visible if you define an alias client for the localhost entries, when using both IPv4 and IPv6. In the aliasclient table, create an entry localhost with a unique id, than in the network table, create an entry, using MAC address 00:00:00:00:00:00 and assign it the above used unique id. This will eliminate two local host entries in the dashboard, when using both IPv4 (0.0.0.0) and IPv6 (::). The entry for localhost (MAC 00:00:00:00:00:00) is suggested in group management / clients /known clients, you can add it there, but as indicated, there is no option to add the unique id, use SQL.

According to DL6ER, read here, the web interface simply hasn't been updated to handle the alias client feature, and will not be in v5x...

2 Likes

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