Conditional Forwarding isn't working

The issue I am facing:
Can't connect to a local domain with Pi-hole as a DNS server while my router is handling the DHCP server. I can still connect to said domain if Pi-hole handles both DNS and DHCP. I've created a local DNS record inside the Pi-hole.
Details about my system:
Proxmox VE
Pi-hole running as an LXC container at 192.168.1.60
Nginx and Jellyfin running as LXC containers at 192.168.1.173 and 192.168.1.150 (jelme.local), respectively
ISP Modem/Router at 192.168.1.1

Conditional Formatting:
Local network in CIDR notation: 192.168.1.0/24
IP address of your DHCP server (router): 192.168.1.1
Local domain name (optional): blank

root@pihole:~# dig jelme.local @192.168.1.1

; <<>> DiG 9.18.24-1-Debian <<>> jelme.local @192.168.1.1
;; global options: +cmd
;; Got answer:
;; WARNING: .local is reserved for Multicast DNS
;; You are currently testing what happens when an mDNS query is leaked to DNS
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 32681
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;jelme.local.                   IN      A

;; AUTHORITY SECTION:
.                       3221    IN      SOA     a.root-servers.net. nstld.verisign-grs.com. 2024031802 1800 900 604800 86400

;; Query time: 3 msec
;; SERVER: 192.168.1.1#53(192.168.1.1) (UDP)
;; WHEN: Tue Mar 19 11:15:16 +07 2024
;; MSG SIZE  rcvd: 115

Debug token at: https://tricorder.pi-hole.net/qRC6cgLQ/

This is probably why.

Conditional Forwarding queries your router for local domains, so it depends on your router running a DNS server that knows about local names.

Not all routers do so - your dig is actually a good method to check if it does.
In your case, it demonstrates that your router at 192.168.1.1 does not know jelme.local.

Pi-hole would receive the same reply if you had configured Conditional Forwarding to use .local as local domain (but yours is blank).

However, note that .local is reserved for mDNS and should not be used with DNS.

Also, your debug log shows that your router's DHCP server is not distributing a domain-name at all:

*** [ DIAGNOSING ]: Discovering active DHCP servers (takes 10 seconds)
   Scanning all your interfaces for DHCP servers
   
   * Received 300 bytes from eth0:192.168.1.1
     Offered IP address: 192.168.1.70
     DHCP options:
      Message type: DHCPOFFER (2)
      router: 192.168.1.1
      dns-server: 192.168.1.60
      dns-server: 1.1.1.1

That would match your CF configuration.
Without a local domain, Pi-hole would only forward plain, non-dot hostnames to your router's DNS server.

You should verify whether your router would know jelme.
What's the result of:

dig jelme @192.168.1.1

Unrelated to your observation, your router's DHCP server distributes a second DNS server besides Pi-hole, allowing clients to by-pass Pi-hole via 1.1.1.1 at their discretion. Pi-hole has to be the sole DNS server for your clients.

Yep, it seems that removing the secondary DNS by entering 0.0.0.0 on my router solve the problem. You're a saver.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.