The ad blocker part is working fine. I had to put the DNS in the router DHCP server section since the pi-hole is on a static address in the same subnet but out of the range of the pool of IPs.
My problem is getting DNS to work, sort of. I must be missing a step. I added the dns records and it seemed to take the adds. But it didn't work. I tried rebooting the pi-hole. Still nothing. I then added the same ips and hostnames to the pi-hole's /etc/hosts. After rebooting the hostnames could now be reaching by name in the browser.
So while getting my facts straight for this post, I went back to the /etc/hosts and the records were not there. They were still in the /etc/pihole/custom.list and on the web admin page.
Not sure what made that start working. I added a new dns record using the admin page and that hostname is not working but the other 2 are.
what is the proper sequence of things to restart or reboot to make this work? do I need to reboot the router??
Thanks for the information. I'm guessing there is some timing issue with my router picking up the new dns records. I didn't reboot the router. However, I did add the new dns record to the /etc/hosts file and rebooted. It was immediately available by hostname anywhere on the network.
Can't say I understand why, but I can get it working.
So I had 2 dns records in my list on the pi-hole admin page and they were working. I added a third and while ssh'd into the pi-hole I saw it had update the /etc/pihole/custom.list. I then on the pi-hole did the command pihole restartdns
I just added a new dns record for a PC on my network that is at a reserved address. I use the admin page and reserved it, it showed up in the custom.list file and I restarted the pihole dns.
The machine you ran that nslookup from is using a localhost stub resolver, and that stub resolver does not (or not always) use Pi-hole for DNS, else it would've returned your Pi-hole's IP.
Since it doesn't use Pi-hole, it won't be able to resolve names as defined in Pi-hole.
Either configure your stub resolver to use Pi-hole as its only upstream, or disable it.
Edit: Note that Local DNS records take effect immediately. It is not required to restart Pi-hole or reboot the entire machine.
Thanks for the help. The client machine that is running the nslookup is running Linux Mint 21.3. I don't know what a stub resolver is so I probably didn't setup one up. I know that all machines on my network run avahi-daemon systemd service and that allows me to get to any machine using hostname.local. That works for ping and ssh but not http:hostname.local:port in a browser.
I just found out that to get around my two original dns records not working in pi.hole I had added them to the /etc/hosts file on the client PC. That was why it was working originally. I've now removed those.
FYI, I guessed you may mean stub resolver is systemd-resolved and I tested disabling that. It could not even find google.com then. So I reenabled it and I'm back to where I was.
I changed my client PC over to a brand new N100 nuc that I just setup with Endeavour OS which is based on Archlinux. On that machine it looks like things are working correctly:
So it's a client problem or a Linux Mint problem. If I can't find the mystery stub resolver I may just have to reinstall linux on this client and then restore the data from the NAS.
You can run cat /etc/resolv.conf and see what you client shows as its nameserver. It will likely shows the 127.0.0.53. So either your not being served pihole as the dns resolver through DHCP or your network interface is set to use that 127.0.0.53 as its resolver.
Another thought. The bad client is configured with a bridge so my KVM VMs that use that bridge can appear on the same local network as all my real systems. Could that have introduced a problem?
sudo nmcli con add ifname br0 type bridge con-name br0
sudo nmcli con add type bridge-slave ifname eno1 master br0
sudo nmcli con modify br0 bridge.stp no
sudo nmcli con down "Wired connection 1"
sudo nmcli con up br0
I've done a lot of moving from PC to PC and running this nslookup test.
The bridge is not the problem.
Running on a VM is not the problem.
Only problems show up on Linux Mint 21 or 22 (ubuntu based) either native or in a VM
So I'm not sure how to identify what's in LM's networking settings that could be causing this?