PiHole 6 appears to be ignoring hosts file

Was recently made aware that Pihole v6 was available and so proceeded to investigate updating

Hit PiHole via SSH and run apt update/apt upgrade all was well, run pihole -up and receive warnings about unsupported OS (Bullseye) which I thought ok time for an update.

Open a new SD card, flashed Bookworm, install PiHole, restored from previous teleporter export, all my lists come over, password is already set GUI confugured how I like and all is well... that is, except for the query log, that is now showing IP's instead of hostnames as configured in my /etc/hosts file.

Initially I thought the import of the previous teleport export had borked something with paths or something, so flattened the card again and installed Bookworm again and re-installed PiHole without importing from the prevuios export.

I've tried a new hosts file, copying one accross from the old sd card, editing the default hosts file all to no avail, irrespective of steps taken to resolve, query log always shows IP's rather than host names.

Expected Behaviour:

When I view the query log, I should see requests from hostnames rather than IP addresses as configured in the /etc/hosts file

Actual Behaviour:

When I view the query log, I see requests from IP addresses rather than the host names configured in /etc/hosts

Debug Token:

(https://tricorder.pi-hole.net/mIitzYLI/)

I can confirm this. The clients registered in hosts file are ignored.
I believe this client name treatment has changed.
You have to register your clients via "Client group management".

Can anybody confirm this ?

Tried some of those in there as well, some the same as those entered in the hosts file and some entirely different (So I could fathom where I need to edit/create the hosts file) but nope, still doesn't work there for me.

restarted, shut down/start up no change the query log ignored anything hosts file-like

I sure do wish there was a way to roll back to v5.xx.yy

For an IP that you expect to show up by name, what's the result of:

dig -x <ip.ad.dr.es> @10.10.10.2

where you substitute <ip.ad.dr.es> as appropriate.

Hi, thanks for your reply.

the response is as follows:

dig -x 10.10.10.70 @10.10.10.2

; <<>> DiG 9.18.33-1~deb12u2-Debian <<>> -x 10.10.10.70 @10.10.10.2
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24564
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;70.10.10.10.in-addr.arpa. IN PTR

;; Query time: 3 msec
;; SERVER: 10.10.10.2#53(10.10.10.2) (UDP)
;; WHEN: Thu Feb 20 22:07:33 GMT 2025
;; MSG SIZE rcvd: 53

How did that register in /var/log/pihole/pihole.log?

If you can't find that, repeat the request and monitor that file via Tools|Tail log files|pihole.log or sudo pihole -t.

Hey, looks like this so far as I can tell:

image

Seems one of your custom regex filters blocks reverse resolution.

What's the output of:

pihole -q in-addr.arpa

though I do see the following in domains:

image

I could have sworn that I'd not imported anything from the previous teleport...

Hmmm

That output looks buggy.

Let's try to lookup the regex that blocks in-addr.arpa via Pi-hole's UI at Tools | Search lists.

EDIT:

That regex is the culprit.
You should remove or disable it.

Well, I've disabled that ^^ regex filter in domains and I am now seeing names instead of IP's in the query log for those I have configured, so now it's disabled when I search adlists in the gui I get:

However if I re-enable it I get:

so yes, thank you, disabling/removing that regex filter has indeed resolved my issue.

You, sir, are a gentleman and a scholar, I was, indeed, hoist by my own petard!

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