I have Pi-hole running on Ubuntu Server 22.04. The IP address is 10.100.0.2 and the hostname is frigg. The /etc/resolv.conf shows the following.
nameserver 127.0.0.1
nameserver 10.100.0.2
search home.linuxtraveler.blog
I added the 10.100.0.2 and the search domain. The local host was added from the installation of the Ubuntu Server.
Expected Behaviour:
When I use any computer on my network, except frigg. I can resolve the hostnames listed in Pi-hole's local DNS. Here is the output from nslookup on my desktop running LMDE 6.
dale@Vali:~$ nslookup
> server
Default server: 10.100.0.2
Address: 10.100.0.2#53
> gateway
Server: 10.100.0.2
Address: 10.100.0.2#53
Name: gateway.home.thelinuxtraveler.blog
Address: 10.100.0.1
>
Here is what is shown in the pihole.log.
Feb 5 18:29:55: query[A] frigg.home.thelinuxtraveler.blog from 10.100.0.194
Feb 5 18:29:55: Pi-hole hostname frigg.home.thelinuxtraveler.blog is 10.100.0.2
Feb 5 18:30:03: query[A] gateway.home.thelinuxtraveler.blog from 10.100.0.194
Feb 5 18:30:03: /etc/pihole/custom.list gateway.home.thelinuxtraveler.blog is 10.100.0.1
Feb 5 18:30:03: query[AAAA] gateway.home.thelinuxtraveler.blog from 10.100.0.194
Feb 5 18:30:03: config gateway.home.thelinuxtraveler.blog is NODATA-IPv6
Actual Behaviour:
When I am logged into frigg. I can't resolve the hostnames listed in the Pi-hole's local DNS. Here is the output using nslookup with localhost. I get the error "** server can't find gateway: NXDOMAIN".
Here is what is shown in the pihole.log.
Feb 5 18:17:05: query[A] gateway.home.linuxtraveler.blog from 127.0.0.1
Feb 5 18:17:05: cached gateway.home.linuxtraveler.blog is NXDOMAIN
Feb 5 18:17:05: query[A] gateway from 127.0.0.1
Feb 5 18:17:05: config gateway is NXDOMAIN
Feb 5 18:17:16: query[A] frigg.home.thelinuxtraveler.blog from 10.100.0.194
Feb 5 18:17:16: Pi-hole hostname frigg.home.thelinuxtraveler.blog is 10.100.0.2
I get the same error when nslookup is using 10.100.0.2 (frigg's IP address).
When I use nslookup with 10.100.0.2 (frigg's IP address) here is what is shown in the pihole.log
Feb 5 18:22:54: query[A] gateway.home.linuxtraveler.blog from 10.100.0.2
Feb 5 18:22:54: cached gateway.home.linuxtraveler.blog is NXDOMAIN
Feb 5 18:22:54: query[A] gateway from 10.100.0.2
Feb 5 18:22:54: config gateway is NXDOMAIN
If I use the FQDN on frigg, it will resolve them to the IP address.
dale@frigg:~$ nslookup
> server
Default server: 127.0.0.1
Address: 127.0.0.1#53
Default server: 10.100.0.2
Address: 10.100.0.2#53
> gateway.home.thelinuxtraveler.blog
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: gateway.home.thelinuxtraveler.blog
Address: 10.100.0.1
>
Here is what is shown in the pihole.log.
Feb 5 18:46:56: query[A] gateway.home.thelinuxtraveler.blog from 127.0.0.1
Feb 5 18:46:56: /etc/pihole/custom.list gateway.home.thelinuxtraveler.blog is 10.100.0.1
Feb 5 18:46:56: query[AAAA] gateway.home.thelinuxtraveler.blog from 127.0.0.1
Feb 5 18:46:56: config gateway.home.thelinuxtraveler.blog is NODATA-IPv6
Here is what is shown when I use frigg's IP address with nslookup.
> server 10.100.0.2
Default server: 10.100.0.2
Address: 10.100.0.2#53
> gateway.home.thelinuxtraveler.blog
Server: 10.100.0.2
Address: 10.100.0.2#53
Name: gateway.home.thelinuxtraveler.blog
Address: 10.100.0.1
>
Here is what is shown in the pihole.log.
Feb 5 18:49:44: query[A] gateway.home.thelinuxtraveler.blog from 10.100.0.2
Feb 5 18:49:44: /etc/pihole/custom.list gateway.home.thelinuxtraveler.blog is 10.100.0.1
Feb 5 18:49:44: query[AAAA] gateway.home.thelinuxtraveler.blog from 10.100.0.2
Feb 5 18:49:44: config gateway.home.thelinuxtraveler.blog is NODATA-IPv6
Feb 5 18:49:48: query[A] frigg.home.thelinuxtraveler.blog from 10.100.0.194
Feb 5 18:49:48: Pi-hole hostname frigg.home.thelinuxtraveler.blog is 10.100.0.2
Debug Token:
https://tricorder.pi-hole.net/s6FGN6Em/
A friend is using Debian 11 to run Pi-hole. He also has local DNS configured. When he is logged into his Debian 11 computer (that is running Pi-hole) he can resolve hostnames along with his other computers.
I don't know why I can't do the same on my Ubuntu Server running Pi-hole. I just updated Pi-hole to the current version with no change in behavior.
Thank you,
Dale