I come from a Windows Server background (30 years) and am now retired and trying to use my Pi for DNS. In Windows hosts that had statically assigned usually had to be entered manually, while those with IPs assigned by DHCP were automatically entered in the DNS Zone.
Actual Behaviour:
I have added a few static (DHCP reserved) records and can ping these with ping -a <IP_ADDRESS>. The IP Addresses assigned by DHCP are not showing Local DNS and do not respond to pings to hostname nor with the -a switch to IP_ADDRESS. Do I have to manually add DHCP assigned entries to DNS‽
Debug Token:
Replace this text with the debug token provided from running pihole -d
Have run the command and the file is located in /var/log/pihole/pihole_debug: however, I can't open/move/upload it as I don't have permission. How do I change this behaviour (please be gentle - Windows user and learning)?
Your current DHCP server is your Synology DS223j, but Pi-hole doesn't know what is configured there.
You can use the reverse DNS server option (also know as Conditional Forwarding). This option will use the other server (Synology DS223j) to return the hostnames.
On the Settings > DNS page, scroll down to the Conditional Forwarding table, then enter the server details:
Replace teejayuu.network with your real network domain.
This will make Pi-hole ask the other server for the hostnames. If the server is able to answer reverse DNS queries, the names will be returned.
NOTE:
I noticed you configured some static DHCP leases in Pi-hole (Settings > DHCPin Pi-hole web interface), but Pi-hole DHCP server is disabled, so these entries are not loaded and they won't be used.
Pi-hole can only use these entries when its own DHCP server is running.
Have added the Conditional Forwarding entry and waited till all DHCP leases have renewed (24h) and the DNS entries are not showing in Local DNS.
If the server is able to answer reverse DNS queries, the names will be returned.
Does this mean I need DNS (A and PTR records) on the DHCP Server?
I noticed you configured some static DHCP leases in Pi-hole (Settings > DHCPin Pi-hole web interface), but Pi-hole DHCP server is disabled, so these entries are not loaded and they won't be used.
The Local DNS only shows items manually added by you.
Conditional forwarding doesn't store the hostnames. It is used to send DNS queries to your router/server asking for the local hostnames for local IPs.
When the router answers with a hostname, Pi-hole uses that name. A new DNS query is made every time Pi-hole asks for the hostname.
DHCP DNS entries not automatically showing in Local DNS
DHCP static leases and Local DNS entries are completely separated things.
Also, Local DNS page will never automatically add entries. They need to be manually set.
You can manually add entries to the Local DNS page and these entries will be used by Pi-hole. Try to set the entries here and see if they work as expected.
Note:
Your debug log showed you were adding DHCP static leases in Pi-hole, but when the DHCP server is disabled these entries are ignored. This only works when you use Pi-hole as DHCP server.
If you already configured your DHCP static leases on the NAS, maybe Pi-hole can use them.
This is also true for Linux, but in your case the DHCP server is your NAS, so you need to set the static leases on the NAS.
That's why, I suggested to use Conditional Forwarding to get the hostnames already configured on the NAS.
This will only work if your NAS is capable of answering reverse DNS queries.
@Schrodingers-cat thanks. I started with DHCP on Pi-hole but moved it. I just want a DNS solution that automatically adds DHCP assigned records to a Forward and Reverse DNS zone that I can see. I was looking for a Linux DNS solution that led me to Pi-hole...the ad-blocking solution is just a welcome addition.
Trying to set this up on my home network after doing this for 30 years in a Windows environment. I want to embrace Linux, but am finding the level of support to newbies to be too technical.
If you know the basics behind everything (Networking/DNS/etc.) it's not that difficult and often simply a matter of reading the documentation for a specific piece of software, perhaps more than once, and installing and configuring everything
"My Open Source Software Adventure" once began with FreeBSD 4.x/5.x and thanks to their FreeBSD Handbook and some help here and there at times I had learned a lot within a very short time and later on a lot of it transitioned to Linux too
Hi @nero355, I know the basics behind DNS/DHCP/etc, and I know what I want to do. I've spent nearly 30 years working with DNS and DHCP in a Windows environment, I just want to replicate that on my Pi's.