PiHole app not quite working correctly

I’m trying to upgrade my home lab from TrueNAS Core system to TrueNAS Scale so that I might take advantage of using the apps function to support running PiHole on my server.

I’m have been using PiHole on a Raspberry Pi 3B for years to be my networks DNS and DHCP server and it works great! But it would be nice to have one less piece of hardware running when I have a mostly idle server box sitting next to it.

I’ve got most of it working, but for reasons I cannot fathom, I cannot get PiHole to resolve the server itself. When I do a nslookup using pihole on my server as the resolver, it connects correctly, but only resolves itself as IPV4 0.0.0.0 while it does resolve the IPV6 address correctly. For the most part, my internal network does not use IPV6.

For example, my server’s IPV4 address is 172.16.30.200. When I do an nslookup from the server here are the results:

root@myserver[~]# nslookup

server 172.16.30.200
Default server: 172.16.30.200
Address: 172.16.30.200#53
myserver
Server: 172.16.70.200
Address: 172.16.70.200#53

Name: myserver.mynet.local
Address: 0.0.0.0
Name: myserver.mynet.local
Address: fe80::aa5e:45ff:fe3e:97d0

My “real” PiHole had been shutdown before starting the PiHole app on myserver. The “real” PiHole server’s IP was 172.16.30.220 and when I queried myserver it responded with the correct IPV4 address. Both the real PiHole and the PiHole app have been configured exactly the same with both the same static IP addresses and the same CNAME records. The only significant change between running the real PiHole and the PiHole app is that in the TrueNAS Scale 24.04.0 GUI, I had to change the Nameserver in Network → Global Configuration from the real PiHole address (172.16.30.200) to the PiHole app address (172.16.30.200) which is the same address as the server.

Can anybody explain what I need to do to get this working correctly. I’m at my wits end.

Thank you

Greg

Is this domain publicly pointing to your server? Did you maybe forget to setup a local DNS entry on your new machine?

This domain is internal only. I believe domains ending in .local are to be used as only internal domains.

Also, I misspoke in my original post. I have created a LOCAL DNS (A/AAAA) record and not a CNAME record.

So, in the PiHole, I have created both a static DHCP address associated with this machine, as well as a LOCAL DNS (A/AAAA) record.

It has a static DHCP address of myserver.mynet.local at 172.16.30.200.
It has a LOCAL DNS record of myserver, myserver.mynet.local 172.16.30.200

I have tried using a LOCAL DNS record of just myserver.mynet.local 172.16.30.200 without the addition of just myserver and it seems to make no difference.

When I’m logged on to the TrueNAS server via ssh or logged on to any other host on my network and issue either a “nslookup myserver” or “nslookup myserver.mynet.local” it always returns with 0.0.0.0 for the IPV4 address and a somewhat valid IPV6 address.

I’m trying to set up a new network with just a couple of hosts and my backup TrueNAS server to do some further testing (without screwing up my existing clients). But any help or suggestions as to what I’m doing wrong would help. I know, it has to be something I’m doing, but just cannot figure out what!

Greg