I'm trying to open my router admin page on my RPi. I type in 192.168.0.1 in the browser. This should open up the router admin page so that I can configure it to use the pihole as the DNS.
Currently, the RPi is connected to my LAN via the WiFi (to configure it). I've set a static IP (within the allowable IP range) for the wired interface.
Actual Behaviour:
The browser keeps telling me that "This site can't be reached". This is only for the router admin interface. The Internet seems to be working fine and is accessible.
Pinging the IP always loses all ping packets.
I tried accessing it via the local domain tplinkwifi.net as an alternate and that does not work either.
Ifconfig shows me that the interface details but there is no gateway listed under the interface. Not sure if this makes a difference but I'm mentioning it here for completeness.
Edit: I also noted the following:
On attempting to visit http://pi.hole/admin in the browser, it launches a search instead of resolving it and loading the admin interface
Edit 2: On checking /etc/pihole/local.list, it shows two entries:
192.169.0.200 raspberrypi
192.169.0.200 pi.hole
Both of them are unavailable IP addresses. I'm not sure where these entries came from but I'm also not sure how to correct them and if they will cause the router admin page to be inaccessible
*** [ DIAGNOSING ]: Discovering active DHCP servers (takes 10 seconds)
DHCP packets received on interface wlan0: 0
DHCP packets received on interface eth0: 0
DHCP packets received on interface lo: 0
How do I make the DHCP server available?
I have a DHCP server running on my router.
For reference, my network is (roughly):
WAN <> TP-Link Router+Modem (Archer A7) <> L2 Switch <> Wired Connections
and
WAN <> TP-Link Router+Modem (Archer A7) <> Wifi
And
WAN <> TP-Link Router+Modem (Archer A7) <> WLan AP via (Ethernet Cable) (TP-Link RE305)<>Wifi
That would depend on what prevents it from being detected by Pi-hole.
From your description, it seems your Pi-hole machine's eth0 is on the same link as your router (unless your switch is L3 rather than L2), so a DHCP server should be available.
Try running pihole -r as suggested, as your addresses do not match either:
*** [ DIAGNOSING ]: Networking
[✓] IPv4 address(es) bound to the eth0 interface:
192.168.0.200/24 does not match the IP found in /etc/pihole/setupVars.conf
I'm sorry if I'm being dense but I'm not familiar with Pihole and Raspbian in general.
The reason why I generated a new debug token was that I actually uninstalled pihole and then installed it again and configured it. This time the address I set for the eth0 interface is 192.168.0.100/24
However, I've not connected the RPi to eth0 yet but only to wlan0 so far. wlan0 is currently set to receive the address from the DHCP server that's currently running on my router (TP-Link Archer A7)
*** [ DIAGNOSING ]: Networking
[✓] IPv4 address(es) bound to the eth0 interface:
192.168.0.200/24 does not match the IP found in /etc/pihole/setupVars.conf
I noticed this too and I wasn't able to identify how to fix it (I'm not sure if I could go ahead and edit setupVars.conf directly. Which is why I uninstalled it and reinstalled it.
Even after this, I'm only able to access the pihole admin interface via 192.168.0.200/admin though I've not used this IP anywhere during the 2nd install.
Ps. The switch is definitely an L2 Switch - I just reconfirmed from its spec
Okay. I've done that. Reconfigured Pihole (pihole -r), selected the plan interface, set the IP to 192.168.0.7 which is also what I've set in my dhcp settings on the router (i.e. reserved address for the wlan0 mac address.
I tried setting the RPi as the DNS for my laptop (MacBook Pro running Big Sur). The Internet stopped working after the change. Nothing would load and the browser would keep spinning