Setting up Pi-hole

AdGuard Home rather than Pi-Hole but other than setting AGH as the DHCP server is there anyway to get the clients to list as their hostname rather than their IP?
Settings/ DNS Settings - Private Reverse DNS Servers. My router is my DHCP server so I put it’s IP address in the box and ticked the two boxes just below it
 
  • Like
Reactions: maj
To list as hostname 'where' exactly? Do you mean in the stats (top clients), the query log, or other? If you set up a list of clients (Settings > Client settings) the name you set there (Client ID) will be the one displayed in the stats and logs, in lieu of IP address. For example, john-macbook or janet-pc as opposed to 172,16.0.12 and 172.16.0.17.

In the top clients. Was hoping there was a way to not have to manually tag a device to an IP.

Settings/ DNS Settings - Private Reverse DNS Servers. My router is my DHCP server so I put it’s IP address in the box and ticked the two boxes just below it
Sorry I should have said I had already tried this. All clients still just get listed by their IP.
 
I updated the eeprom on my Pi 5 last night having watched a Jeff Geerling YT video about the new RPi5 16GB. I checked for an eeprom update and installed it then restarted. I wasn't able to navigate to the Pi at its static IP address (192.168.0.134) so I left it until this morning so I couldn't SSH in or administer the Pi-Hole via the web interface.

When I got up this morning the Pi still wasn't accessible at the IP address so I plugged an HDMI lead in to my TV and found that Pi-Hole is running as the screen was at the Pi-Hole login prompt. However the IP address was wrong - 127.0.0.1. I restarted the Pi several times and used a different ethernet cable on a different port on the switch. Nothing seems to be working. How can I get the Pi to use its defined IP address? The reservation for the Pi is set on my router, which I can still access; the router has a single reservation of 192.168.0.134 for the MAC address of the Pi. If the router is working, accessible and has the reservation active why isn't the Pi getting its reserved IP address? I was wondering if perhaps the Pi's Ethernet port had switched off but it has an active connection as the port lights are on.

What would be easier - To reverse the eeprom update or to fix the Pi's IP address issue?
 
Maybe the eeprom update has somehow changed or cleared the MAC Address, causing the reservation to fail?

If that were the case then the Pi should still get an IP from the DHCP server, albeit not the one in the reservation unless the NIC has no MAC address at all which I don't think I've ever seen. Sounds like a dead NIC to me.

@MarcLister - Can you log into the Pi locally? If you can run the command 'ifconfig' (or 'ip a') and see if the NIC even shows up.

Edit - 'lspci' is worth running too.
 
Last edited:
Can you log in via console, and do this on the command line? It should show two interfaces, the loopback and eth0 and the details.

Code:
ip a

Edit, this is my PiKVM, but it should be similar.

Code:
[root@pikvm ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
    inet 192.168.x.x/24 metric 10 brd 192.168.x.x scope global dynamic eth0
       valid_lft 70487sec preferred_lft 70487sec
    inet6 xxxx:xxxx:xx:f001:xxxx:xxx:xxxx:xxxx/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 86396sec preferred_lft 86396sec
    inet6 fe80::xxxx:xxx:xxxx:xxxx/64 scope link proto kernel_ll
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff
 
Last edited:
If that were the case then the Pi should still get an IP from the DHCP server, albeit not the one in the reservation unless the NIC has no MAC address at all which I don't think I've ever seen. Sounds like a dead NIC to me.

@MarcLister - Can you log into the Pi locally? If you can run the command 'ifconfig' (or 'ip a') and see if the NIC even shows up.

Edit - 'lspci' is worth running too.
Just went to check the MAC address as I was going downstairs to get a drink. The MAC address I get when I run ifconfig matches the MAC address in the reservation on the router.

I'll do an lspci when I get lunch.

Edit, forgot to say the NIC lights are on. The green data/transmit light is either static or blinks uniformly. I would expect to be blinking incessantly with all the traffic?
Can you log in via console, and do this on the command line? It should show two interfaces, the loopback and eth0 and the details.

Code:
ip a

Edit, this is my PiKVM, but it should be similar.

Code:
[root@pikvm ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
    inet 192.168.x.x/24 metric 10 brd 192.168.x.x scope global dynamic eth0
       valid_lft 70487sec preferred_lft 70487sec
    inet6 xxxx:xxxx:xx:f001:xxxx:xxx:xxxx:xxxx/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 86396sec preferred_lft 86396sec
    inet6 fe80::xxxx:xxx:xxxx:xxxx/64 scope link proto kernel_ll
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff
Does ip a differ from an ifconfig? ifconfig shows the MAC address and it matches the reservation. I'll take photos of ifconfig, ip a and lspci and upload them later on.
 
Last edited:
Raspberry Pi OS Lite x64. Cool, I'll give 'ip a' go later on.
Look whether the interface is up.

Is it connected to a switch? Is it managed? Anything else on the switch and are they all working? You could try a different port, or different cable and reboot the Pi.

Are you sure the Pi hasn't booted into recovery mode? If it's booted into the OS, it looks to be a physical issue somewhere, as mentioned earlier if the MAC had changed it should have got a different IP from the DHCP server.
 
Look whether the interface is up.

Is it connected to a switch? Is it managed? Anything else on the switch and are they all working? You could try a different port, or different cable and reboot the Pi.

Are you sure the Pi hasn't booted into recovery mode? If it's booted into the OS, it looks to be a physical issue somewhere, as mentioned earlier if the MAC had changed it should have got a different IP from the DHCP server.
It's plugged into an unmanaged switch. My computer goes to a 2.5GB switch which plugs into the same switch the RPi5 is plugged into. That switch then plugs into my router. So router > unmanaged gigabit switch (Pi plugs in here) > 2.5GB unmanaged switch (my computer plugs in here).

Therefore I believe both switches are fine as I'm going through both to the router and I've been online all this morning. Have already rebooted Pi several times and changed both cable between switch and Pi and the port. The NIC lights are active and I'm seeing the green light flash to show data transfer. Pi-Hole looks to be working as I see no ads on https://fuzzthepiguy.tech/adtest/. The Pi is on the login prompt for the OS. I have logged in this morning to check a few things.
 
How can it be working if it doesn't have an IP address? What address is your PC/router using for DNS? Is it the Pi? If so, does that address ping and can you browse to it?
Quite. I was thinking this doesn't make sense. I've just done an ipconfig /all on my desktop and there are three DNS servers. One of them is 192.168.0.134, which isn't working. However the other two are IPv6 and my computer has an IPv6 address as well as an IPv4 one. I reckon the Pi has started using an IPv6 address which is why it's still working.
 
hmmm... I swapped the tin that my server was running on from a pi 4 8gb to the pi5 16gb and just checked pi hole (due to this tread) and it doesn't seem to be working...
some tinkering is needed...

EDIT: well that was a quick fix, it seems that my router changed back to a default IPS DNS server as the pi-hole server wasn't avaiable for a period of time as I had to remove the ip reservation, restart the router then reserve the ip address for the new pi.
changing the dns server back to the pi-hole server and it worked straight away again.
 
Last edited:
Back
Top Bottom