Pihole to work, recieve clients, and block ads. None of the above is happening. I have set my modem to use my pi as the only DNS server(s), and port 53 is open in my pi's firewall. I have Pihole v5.11.4, with AdminLTE version 5.13 and FTL version 5.16.1. Pihole is running on my Raspberry pi 0 W, running Raspbian Buster.
Actual Behaviour:
Pihole is running okay, but is recieving no clients and blocking no ads on any of my devices. DNS seems to be working fine, and I can access websites despite seemingly not going through Pihole.
Running nslookup gives me the following:
How do your clients know to use Pi-hole? Your DHCP server (your router) is not distributing the IP of Pi-hole for DNS.
*** [ DIAGNOSING ]: Discovering active DHCP servers (takes 10 seconds)
Scanning all your interfaces for DHCP servers
Timeout: 10 seconds
* Received 336 bytes from wlan0:192.168.2.1
Offered IP address: 192.168.2.245
Server IP address: N/A
Relay-agent IP address: N/A
BOOTP server: (empty)
BOOTP file: (empty)
DHCP options:
Message type: DHCPOFFER (2)
server-identifier: 192.168.2.1
lease-time: 86400 ( 1d )
netmask: 255.255.255.0
router: 192.168.2.1
dns-server: 192.168.2.1
renewal-time: 43200 ( 12h )
rebinding-time: 75600 ( 21h )
broadcast: 192.168.2.255
domain-name: "home"
--- end of options ---
DHCP packets received on interface wlan0: 1
DHCP packets received on interface lo: 0
Your Pi-hole appears to be at this IP:
wlan0 (192.168.2.245)
The output of your nslookup command is expected, since the Pi itself is not using Pi-hole for DNS. It is using the router and another DNS that is not Pi-hole.
How do I ensure that my router distributes the IP? As I said, I have set the DNS in my router's configuration to the Pi-hole(Both primary and secondary). Also, the results of nslookup I posted are from my computer, not the pi. I also have an app on my android phone that shows the DNS server, and it just shows the router's IP.
After you made this change, did you renew the DHCP lease on all clients?
Originally I did not, however I just did. Doesn't seem to have made a difference.
The problem appears to be in your router settings for DHCP. The latest nslookup results you posted show that the client uses Pi-hole when the queries are specifically directed at Pi-hole (which overrides the client DNS settings).
Would using Pi-hole's DHCP help? If not, what other DHCP settings could affect this? The ones my router gives me access too are the IP range and the lease duration, as well as the ability to disable DHCP.
I disabled my router's DHCP, and enabled Pi-hole's, and tried to reconnect to the network on my phone. After trying to connect for a while, it failed with the error "Failed to obtain IP address". After re-enabling my router's DHCP and disabling Pi-Hole's, it was able to connect right away. Is there other setup I need to do for Pi-hole's DHCP to work?