I’m running into a strange client naming issue with Pi-hole and Apple devices and would like to understand if this is expected behavior or a misconfiguration.
Setup:
Pi-hole v6 in Docker Portainer (host network)
FRITZ!Box as DHCP server (IPv4 + IPv6 enabled)
FRITZ!Box distributes Pi-hole as DNS for IPv4 and IPv6
For multiple clients, Pi-hole shows a UUID-like hostname (e.g. ddc0672f-ef9f-48c7-9b35-4bbae07f872d.fritz.box) even for the IPv4 address.
At the same time:
The FRITZ!Box always shows the correct, human-readable device names
IPv6 addresses are sometimes resolved correctly to the real hostname
After a DHCP lease renew on my Mac, Pi-hole briefly shows the correct hostname, but after some time it switches back to the UUID again (Mac Terminal also)
Question:
Is this expected behavior with Apple devices (macOS/iOS, IPv6, privacy features), or is there a recommended Pi-hole configuration to keep stable, readable hostnames without manually setting HostName on each client?
Please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:
Yes, I have now also turned off the private WLAN address on my Apple devices.
In addition, I have changed a few things in the Fritzbox and the Pihole.
I entered the IP and also the hostname on pihole for DNS-Rebind-protect. Google had told me that, I don't know if it's important.
The Fritzbox also distributes the ipv6 address of the Pihole. But I turned off the DHCPv6 server in the Fritzbox.
With the Pihole I have set under DNS conditional forwarding correctly. Pihole only listens to “Allow only local requests”. “Never forward non...” I have off, “Never forward Reverse...” I have on.
I didn't enter any local DNS records. The Fritzbox does DHCP.
Currently it seems to work.
What do you think, are the attitudes so right or is something still fundamentally wrong with me?
Are you able to run a tcpdump on one of your systems?
If I run one with "Use private Wi-FI" turned off, and disable/enable wifi on my iPhone(17) thats named iPhone01 in the "About" settings:
$ sudo tcpdump -ntvvvi any udp port 67
[..]
DHCP-Message (53), length 1: Request
[..]
Hostname (12), length 8: "iPhone01"
Thats the one that registers in my Pi-hole which is setup to functions as a DHCP service:
FYI, when most clients connect, they broadcast a DHCPDISCOVER or a DHCPREQUEST that includes the name/hostname to all hosts connected to your network segment (including your router).
I totally forgot but if you dont have tcpdump available, you could try capture/dump "everything" with below:
But instead of dropping those two "everything" lines in a dnsmasq config file, better add them via the webGUI:
Settings > System > flip Basic to Expert > All settings > Miscellaneous > misc.dnsmasq_lines
And conveniently inspect/filter the captured packets for DHCP from the resulting pcap file with a DE and Wireshark on another machine:
Dont forget to disable again or that dump file will just grow huge
EDIT: Oh in Wireshark, you can use the same filter as with tcpdump if select the proper interface first:
udp port 67
EDIT2: I'm not thinking straight
If install Wireshark on another machine, you dont have to capture the packets via Pi-hole.
You can do that directly on the Wireshark box as the DHCP packets you're interested in are broadcasted to every host connected to the same network segment/broadcast domain.
@deHakkelaar Unfortunately, I don't know exactly what you mean. Can you explain this again for beginners? Does that solve my problem? Or are my problems normal with Pihole?
Edit: Currently I have the correct hostname again. It was funny that earlier this morning on the client the Internet loaded extremely extremely slowly (client has Pihole Blocking on). After I had only deactivated Pihole, it went quickly.
I tried explaining how those names are discovered by Pi-hole in sort of chronological order.
A client advertises its name/hostname during the DHCP lease transaction to the DHCP server (the tcpdump example).
Fritzbox or Pi-hole creates A and PTR DNS records for those DHCP advertised names.
And if Pi-hole is not doing DHCP services for your LAN, it can discover those names via "Conditional Forwarding" from Fritzbox by performing reverse lookups (IP to name) against Fritzbox for known client IP's (the nslookup example).
Is it working now as expected or do you still need further digging?
Was private Wi-Fi addresses the culprit?
EDIT: Oh ps, Pi-hole tries to rediscover/refresh those names via Conditional Forwarding every hour ... or at least it used to.
Ah, thank you. No, it's not working at the moment. Sometimes it works, sometimes it doesn't. It had just worked earlier. Just now I have a UUID again (or something similar) in the Mac terminal and Pihole.
Can we go through all the settings together? Maybe I set a wrong setting.
I would just write down my settings here, maybe you will see an error right away.
Fritzbox:
DHCP Server
Distributed Pihole DNS Server
IPv6 active
Router Advertisement active in the LAN
Always assign Unique Local Addresses (ULAs)
DNSv6 server also announce via Router Advertisement (RFC 5006) Active
Currently my Mac Terminal shows the UUID (or what exactly it is) again. Also in Pihole under Tools→Network is next to the ipv4 address of my MacBook in brackets this number (for example) 54a82xc5c-f647-4883-daf4-a6482464758c.fritz.box.
In addition to the ipv6 addresses, it displays the correct hostname in brackets.
Earlier, the host name of my MacBook was correctly.
I don't know, but something is wrong here, right? Mal geht es, mal wieder nicht. The right name is in the Fritzbox at any time. Hostname on the Macbook is not set fix and the Macbook does not have a fixed IP either. By the way, the same is the case with the iPhone, except that I don't have a terminal there. But I see it in Pihole that he has this number in brackets.
I dont have an answer and I cant replicate it on my iPhone and iPad.
Plus I dont have native IPv6 on my LAN which maybe also can contribute to what you see.
As noted before, check with tcpdump or Wireshark what hostname your device advertises during the DHCP lease transaction.
And query Fritzbox with nslookup for the Apple device/IP, like in my example, to verify its not Fritzbox passing those names to Pi-hole via CF.