If you shy away from editing the hosts
file, there may be another approach to assay, but it'll involve more manual editing, and you have to test for yourself to find out whether this will produce the names in your fashion, or whether Conditional Forwarding still would take precedence (if enabled coexistingly).
You could try setting up a hostrecord with pihole-FTL for each client by adding a custom configuration file under /etc/dnsmasq.d/
.
You can either do that completely manually from scratch, studying the man page for dnsmasq , or have pihole assist you by executing
pihole -a hostrecord <hostname> 192.168.178.<x>
Of course, you'd have to replace the <bracketed terms> with your respectively applicable values. Implemented FR Domain Redirect - #3 by DL6ER has more details on this.
Pi-hole is adding hostrecords to /etc/dnsmasq.d/01-pihole.conf
by default.
You should be aware that updating pi-hole may overwrite your changes in 01-pihole.conf
.
That's why I'd suggest moving the hostrecord lines into a separate custom configuration file, e.g. /etc/dnsmasq.d/20-local-hostnames.conf
. Once you are familiar with the pattern, you should also be able to edit that file directly, but don't forget to restart when finished.