Devices Not Using Pi-Hole With DHCP Enabled

loaxley

Hello everyone, I recently purchased a Raspberry Pi 4B 4GB. I’m running the latest version of Raspbian. After setting up Homebridge, the very next thing I did was set up Pi-hole. I followed the guide located at Setting up Pi-hole: Step-by-Step Instructions, and install of Pi-hole went off without any issues. I chose Google as the upstream DNS provider. Once install of Pi-hole was complete, I enabled DHCP via Pi-hole and disabled DHCP via my router. I then restarted my routers and modems, as well as the devices I wanted to connect to the internet. Devices now connect to my network and are able to access the internet. However, it doesn’t seem that any of them are using Pi-hole.

When I go into the Pi-hole admin dashboard and click on Network, I see all of the devices on my network, however there’s a black X in the “Uses Pi-hole” column next to each device. It is my understanding (though I could be wrong), that enabling router DHCP and enabling Pi-hole DHCP is supposed to make it so that all devices automatically connect to the network in a way that utilizes Pi-hole. In the Pi-hole admin dashboard, when i click Settings and then DHCP, there are no active DHCP leases.

A bit about my network setup:
Netgear Orbi base station connected to internet source downstairs
Netgear Orbi satellite acting as booster in “Router” mode upstairs. (Satellite is not plugged in to Ethernet source, it is boosting the signal of the main connection from downstairs under the same WiFi SSID).
My Raspberry Pi is plugged in via Ethernet directly to the Netgear Orbi Satellite.
Prior to setting up Pi-hole, I received 300Mbs (the speed I pay for) down on all devices connected via either Ethernet OR Wi-Fi.
Netgear Orbi is reserving 192.168.1.56 for my Raspberry Pi.
I edited /etc/dhcpcd.conf on the Raspberry Pi to only use 192.168.1.56 using the following snippets:
interface eth0
static ip_address=192.168.1.56/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1

interface wlan0
static ip_address=192.168.1.56/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1

Wi-Fi on the Raspberry Pi is DISABLED. It is only connected via Ethernet to the Netgear Orbi Satellite.

On the Pi-hole side:
DHCP is enabled
DHCP range of IP addresses to hand out is 192.168.1.2 through 192.168.1.254
DHCP router IP address is 192.168.1.1
Lease time is 168 hours
All other Pi-hole settings are default
When I go to Pi-hole settings in the admin console on the Raspberry Pi, I see that:
Pi-hole Ethernet interface: wlan0
Pi-hole IPv4 address: 192.168.1.55/24
Pi-hole IPv6 address: blank (i didn’t enble IPV6 DHCP)

All settings on my Netgear Orbi are default, aside from reserving the IP for the Raspberry Pi. I feel like i’m missing something very simple hear as to why my devices aren’t utilizing Pi-hole. Happy to send over any more information or logs that would be helpful here. Thanks in advance for any help you can offer!

Please send us the token generated by

pihole -d

or do it through the Web interface:

Here you go:
https://tricorder.pi-hole.net/mwphveg3b8

One more thing--it appears that the raspberry pi itself is using Pi-hole, because when I go on websites via the Pi web browser, and then check the Query Log, I notice new entries from the sites i'm visiting. But no other devices on my network are using Pi-hole. No updates to the Query Log when web browsing on any other device. And for all the other devices, I disconnected from the Wi-Fi, deleted any remembered settings, restarted the device, then reconnected to the network.

Your Pi does not have an active IP address.

*** [ DIAGNOSING ]: Networking
[✗] No IPv4 address(es) found on the wlan0 interface.

[✗] No IPv6 address(es) found on the wlan0 interface.

[i] Default IPv4 gateway: 192.168.1.1
   * Pinging 192.168.1.1...
[✗] Gateway did not respond. (https://discourse.pi-hole.net/t/why-is-a-default-gateway-important-for-pi-hole/3546)

I'm a bit confused. When I run ifconfig, I get the following--doesn't this show that my IP is 192.168.1.56? Or at least, that's the IP it gets from the Ethernet connection. The networking diagnostic is saying no IP is found on the wlan0 interface. I have Wifi disabled on my pi. Is that the problem? Not sure what I should do from here. As I mentioned before, I reserved 192.168.1.56 for the Pi through the Netgear Orbi.

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.56 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::921f:4fbf:3985:56aa prefixlen 64 scopeid 0x20
ether dc:a6:32:25:73:e2 txqueuelen 1000 (Ethernet)
RX packets 205208 bytes 209114153 (199.4 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 55242 bytes 12883025 (12.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 48530 bytes 30177378 (28.7 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 48530 bytes 30177378 (28.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

I might have found the problem. The Raspeberry Pi has an IP of 192.168.1.56 reserved, but Pi-hole is showing its IP as 192.168.1.55. Do I just need to make those two configurations are the same IP?

You probably installed Pi-hole while being connected by WLAN at first, but switched to Ethernet later (whch is preferable anyhow).

If you do not need WLAN on your RPi, you can keep it switched off altogether (saves some power, too).

You should also ensure Pi-hole is listening on eth0 by editing 01-pihole.conf on your RPi:

sudo nano /etc/dnsmasq.d/01-pihole.conf

Locate the line starting with interface= and make sure it reads

interface=eth0

Save and exit, then restart Pi-hole's DNS:

sudo service pihole-FTL restart

If you still have problems connecting, please post a new token.

EDIT:
Alternatively, running pihole -r with option reconfigure will take care of changing the files for you. This is also the official way to do it.

You're correct. I did install Pi-hole while connected to wlan. I'll make that edit and restart the DNS.

Do I need to make sure that Pi-hole's IP and the Raspberry Pi's IP are the same? Pi-hole has IP of 192.168.1.55 but Pi's IP is 192.168.1.56.

That is probably a left-over from having both WLAN and Ethernet active.
Pi-hole definitely requires a fixed IP address (i.e. one that does never change), though.

No, there should be only one DHCP server on your network.
Leave your router as DHCP server for the moment, until you've sorted out your installation issues.
You can always make up your mind later.

Made a typo here. First enable should have said disable. We're on the same page here.

So really my last question is as follows:

Should the IP here:

Be the same as the IP I reserved for my Raspberry Pi via my router, and that outputs when I run ifconfig?

Right now, the former is 192.168.1.55, and the latter is 192.168.1.56. I can easily make them the same (either by changing it on the Pi-hole side to .56, or on the Pi/router side to .55), if that's something I should be doing.

Yes and no. :wink:
That admin panel section draws the bulk of its information from a file with Pi-hole's defaut settings that get's created on first run.

As you have changed your network setup intermittently, that information is likely lagging behind - a left-over, as I said :wink: - and just a display issue, mostly.

To fix this, run pihole -r.
Or edit sudo nano /etc/pihole/setupVars.conf and replace the IP address in the IPV4_ADDRESS line with the address as assigned by your router and shown for eth0 by ip addr (those two must match, however).

Made the change to eth0, modified the IPV4_ADDRESS, restarted Pi-hole, and now everything works swimmingly :slight_smile:

Always impresses me when free/open source software has better support than paid services. You guys rock!

2 Likes

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