Hostname.lan requests no longer work

Hello.
First of all thanks for this project :slight_smile: . Secondly, I tried googling solution before creating possible duplicate post. Unfortunately I couldn't find working solution.

The problem: I can no longer access devices on my network with hostname and .lan domain after installing pihole. For example jarvis-hub.local works and translates to 192.168.1.3 but jarvis-hub.lan no longer does. I can safely say it's caused by pihole because .lan requests start working as soon as pihole is shutdown.

## pihole was shutdown at this moment
$ ping jarvis-hub.lan
PING jarvis-hub.lan (192.168.1.3) 56(84) bytes of data.
64 bytes from jarvis-hub.lan (192.168.1.3): icmp_seq=1 ttl=64 time=0.141 ms
64 bytes from jarvis-hub.lan (192.168.1.3): icmp_seq=2 ttl=64 time=0.078 ms
...
64 bytes from jarvis-hub.lan (192.168.1.3): icmp_seq=48 ttl=64 time=0.074 ms
64 bytes from jarvis-hub.lan (192.168.1.3): icmp_seq=49 ttl=64 time=0.093 ms
### this is when pihole booted up
64 bytes from 192.168.1.3 (192.168.1.3): icmp_seq=50 ttl=64 time=0.073 ms
64 bytes from 192.168.1.3 (192.168.1.3): icmp_seq=51 ttl=64 time=0.075 ms
^C
$ ping jarvis-hub.lan
ping: jarvis-hub.lan: Name or service not known

I tried unchecking Never forward non-FQDN A and AAAA queries and Never forward reverse lookups for private IP ranges but to no avail.

I run pihole on a freshly installed latest raspberry os, on a dedicated raspberry, with no further configuration, nor services running alongside the pihole. It's one of two devices that I've manually assigned IPs in my routers DHCP table.

I don't want to use pihole as DHCP, nor can I settle for using .local for obvious reasons. Is it possible to configure it to make .lan work again, dynamically without hardcoding my devices in some hosts file or table? I often deploy new home-automation related esp32s to my network and need an unobstructed access to them.

Thanks :slight_smile:

https://tricorder.pi-hole.net/6b8lpAv8/

If you go to Settings > DNS on your Pi-Hole, then scroll all the way to the bottom of the page, you will find configuration for Conditional Forwarding. There you can set if you want to use .lan or .local for your local network domain name.

EDIT: You might also need to change some configuration on your router.
In the picture below you can see the following line:

The local domain name must match the domain name specified in your DHCP server for this to work. You can likely find it withing your DHCP settings.

How did you configure your router to make use of Pi-hole?

DarkCatapulter's suggestion to enable Conditional Forwarding would work - make sure you don't have configured your router to use Pi-hole also as upstream DNS server (often a WAN/Internet setting), as that may close a partial DNS loop.

Also, your debug log shows that your router is distributing its own IP as DNS server via DHCP in addition to Pi-hole:

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

This will allow clients to by-pass your Pi-hole.
Pi-hole has to be your only DNS server for your clients.

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