This line indicates that Pi-hole found the answer in the DHCP information. That is either in the Pi-hole DHCP settings or from the client.
Also check the sharing section of the Mac system preferences - there is an optional device name setting there as well:
Also, 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:
So yeah, it's definitely in there. But how does the old hostname get there.
I already renewed the DHCP-lease and anyway it's set to only be valid for 24h.
I guess it has been stored when the lease was first created, and has been used with any renewal or request since.
To get rid of it, you could try to delete the respective line from dhcp.leases.
It may be advisable to stop Pi-hole before doing so, and restart it afterwards:
sudo service pihole-FTL stop
sudo service pihole-FTL start
Your debug log still shows no sign that your hostname is defined within Pi-hole's scope.
Together with the DHCP lease entry refreshing with d4Rks-MBP, this would strongly suggest your MacBook is sending that name during DHCP lease negotiation.
I don't own a MacBook, but let's try to find out what your MacBook calls itself.
Run from your MacBook, what's the output of:
Looks all pretty good... and until now I was pretty sure, it must be some kind of caching issue on the pi-hole...
BUT I just did a packet capture using Wireshark, while renewing the DHCP lease.
There must not be a space inside the "Computer Name" (System Preferences -> Sharing), see link below.
Really no clue, why I can set the hostname to whatever I want, when in the end, it matters what the computer name is?! Thx Apple for this confusion
Anyway, it works now!
nslookup 192.168.178.119
Server: 192.168.178.2
Address: 192.168.178.2#53
119.178.168.192.in-addr.arpa name = d4Rks-MacBook-Pro.lan.
For the benefit of other users coming by your post, would you be so kind as to share your MacOS version, in case your observed (mis)behaviour would be tied to that specifically?
Also, please note that although your issue has been solved by removing spaces, the discussion you linked was addressing a slightly different one, i.e. the spaces there prevented MacOS from sending a hostname at all, while in your case, MacOS sent a hostname it made up itself, differing from the one you configured.
Anyway, this seems like a veritable bug within Apple's OS to me.
(EDIT: And it's all the more confusing since the bulk of the names appearing in your MacBook correctly have dealt with spaces by replacing them with a hyphen "-".)
Yea, that's right, it's not exactly the same issue, but very similar and it pointed me directly to the solution.
I'm using the latest macOS Monterey (12.0.1).