Sorry for the long post ![]()
Setup:
We have a network range (eg. 100.100.100.0/25) and a domain (institute.university.de) in our university network.
I used pihole as a local DNS and DHCP server (I switched from dhcpd on debian when that was no longer developed).
Expected Behaviour:
I would like, that a if I request e.g. the FQDN mars.institute.university.de in our network pihole response with the IP address of the pc "mars". And if this is not possible it should ask upstream.
In pihole v5 I had set our pi-hole DNS domain name: institute.university.de.
I had a bunch of static ip adresses for all our devices within a dnsmasq .conf file (Link to related question).
This worked great, pihole answered to request like fileserver.institute.university.de. with the local ip address.
The DNS entries where also set in the upstream dns servers of our university where the pihole is requesting when an external FQDN is not already known. I am just noticing that I never really checked if domains like server.institute.university.de where answered directly by pihole, or if it send this request upstream. (IP addresses are the same at pihole and upstream, we use a "global" address range.)
Actual Behaviour:
I started to write this question when it did not work at all. Then it worked after another try (I think empty lines in Conditional forwarding cause an error: "dns.revServers[3]: contains two commas following each other immediately" [1]), but my basic question is still open. ![]()
Pihole was not answering request directed at fileserver.institute.university.de. This is as intended and explained in the comment to Pi-hole domain name
The DNS domains for your Pi-hole. This DNS domain is purely local. FTL may answer queries from its local cache and configuration but never forwards any requests upstream unless you have configured a dns.revServer exactly for this domain. If no domain is specified and you are using Pi-hole's DHCP server, then any hostnames with a domain part (i.e., with a period) will be disallowed. If a domain is specified, then hostnames with a domain parts matching the domain here are allowed. In addition, when a suffix is set then hostnames without a domain part have the suffix added as an optional domain part.
So I set a dns.revServer further down in Conditional forwarding
(100.100.5.1 and 100.100.4.1 upstream dns servers of our university):
true,100.100.100.0/25,100.100.4.1,institute.university.de
true,100.100.100.0/25,100.100.5.1,institute.university.de
This works. If I request e.g. venus.institute.university.de the request is send to the DNS server at 100.100.4.1.
But then all DNS entries have to be set in the upstream server (which would be possible in my case, but not in any setting)
#0
What do I have to do, so that the local domain is our university domain institute.university.de and pihole answers requests to our pcs (like mercury.institute.university.de) with the IP pihole as DHCP server has give them?
#1
Is the second line in Conditional forwarding obsolete?
Is it possible to have a failover?
Will pihole "ask" the second DNS Servers in line 2 if the first fails?
#2
Can I set pihole itself? (100.100.100.2 being the ip of the raspberry pi 5)
true,100.100.100.0/25,100.100.100.2,institute.university.de
true,100.100.100.0/25,127.0.0.1,institute.university.de
Thanks for reading this far ![]()
[1] I think will give feedback at GitHub - pi-hole/web: Pi-hole Dashboard for stats and more