PiHole for LAN + Wifi client ?

Hey,

1st, thx for your hard work! Trying for 1st time DietPi, it looks like interesting !

On the RPi v1, there are 2 networks :

  • Wifi hotspot : working ok, but DNS given to clients are GoogleDNS, it’s bad !
  • LAN eth0 : working ok, all others computers on the LAN can use PiHole DNS filtering.
    (my LAN already has a DNS server hosted on another computer… so PiHole is forwarding requests to this one)

Why Wifi clients can’t use PiHole DNS hosted on the same machine ?
I see on some wifi/dhcp config files always the same nameservers : 8.8.8.8 8.8.4.4

When I saw Pihole, I was thinking it’s possible to use it for the whole private network (wired+wifi)
Humm, I’ve forget something may be ?
(or can it be a request…!)

Thx for your help !


Edit: Workaround FIX :

nano /etc/dhcp/dhcpd.conf

Change GoogleDNS IPs (8.8.8.8 8.8.4.4) to your hotspot IP (here is 192.168.42.1 by default)

option domain-name-servers 192.168.42.1;

Then reboot
On PiHole Admin webinterface, settings :
Advanced DNS settings
Listen only on interface eth0 -->> Listen on all interfaces, but allow only queries from devices that are at most one hop away (local devices)
(because pihole was not able to respond on the wlan0 interface)

You can verify on a wifi client by

  • windows :
nslookup dietpi.com
  • linux :
dig dietpi.com

the SERVER line should be 192.168.42.1#53(192.168.42.1)