Unable to connect to Pihole admin

@raspberrypi:\~ $ systemctl is-enabled dhcpcd.service
Failed to get unit file state for dhcpcd.service: No such file or directory
@raspberrypi:\~ $ systemctl is-enabled NetworkManager.service
enabled
@raspberrypi:\~ $ systemctl is-enabled io.netplan.Netplan.service
Failed to get unit file state for io.netplan.Netplan.service: No such file or directory

There are several packages available for most distros to setup networking details and dhcpcd is just one of them.
It seems its not even installed on your setup.
What do the others output?

Plus one more I forgot?

systemctl is-enabled systemd-networkd.service

IMHO that is always the best way! :+1::+1:
I have seen the "modern" way fail before often enough so better skip that one...

NetworkManager has been the default for a while now :wink:

I edited the last reply to show what each one gave me, and

systemctl is-enabled systemd-networkd.service

just gives me "disabled"

Aha i noticed you posted the output for the others too.

It seems Network Manager is the one active on your system.
You can set static IP details for that one with below one:

sudo nmtui

An example for editing my wired connection profile below:

It would be wise to get some basic understanding about what you are using and doing with it so for example have a look at https://www.raspberrypi.com/documentation/ and read everything about installing and configuring a Raspberry Pi :slight_smile:

After setting static IP details, below one should return "manual"!

$ nmcli -t -f name con show --active | xargs -d '\n' -n 1 nmcli -p -f ipv4.method connection show
===============================================================================
                Connection profile details (Wired connection 1)
===============================================================================
ipv4.method:                            manual

So like this?

Thank you for the link, I'll have a look as soon as I'm not burning through mobile data on tiny screens. But this is one of those things I didn't know I needed to know since everything worked for a year and a bit, so I didn't go looking for it?

Yes for that "Wired connection 1" profile.
Not sure what that active "VM5257510" profile is?
You can list all details for that profile with below one:

nmcli --pretty connection show 'VM5257510'

Dont post unredacted output for above one here for privacy!

If connected via Ethernet, you could disable/deactivate that VM5257510 profile with nmtui if have no use for it.

You may (probably) want to set your R-Pi DNS to a public DNS server (Pihole will still work). Your network clients will look at DHCP to know they should use the Pihole for DNS, but the Raspberry Pi device will have its DNS independent of Pihole to provide some resiliency in case Pihole ever goes down; your Raspberry Pi will still be able to get updates, etc.

What you have in the screen shot will work, this is just a suggested improvement.

In the screenshot, the router IP is configured for local DNS.
Thats perfectly fine if the router doesnt have its WAN/Internet DNS settings pointing to the Pi-hole IP.
Remember, Pi-hole is going to take over DHCP services from the router!

EDIT: I have the same config.
And my routers upstream (WAN/Internet) DNS are those from my ISP (the OOTB default setting).

It's the same name as my wifi, so I assumed it was that?

And my router doesn't have DNS settings available, apparently Virgin Media hubs force traffic through their default servers. So do I need to change it or can I leave it?

Disable that one via nmtui.
Dont need it when connected via Ethernet and can confuse the routing table.
Plus maybe Pi-hole starts complaining if that Wifi interface is trying to get an IP from Pi-hole's own DHCP service.

Leave it.
Your assumption is right ... I think :wink:
Most ISP routers have the ISP DNS servers configured for WAN/Internet DNS OOTB.

Ok

So the pi now has a static IP. And all the other settings were ok.

I just turned off the router DHCP and restarted my pc and while I can still see the hub and the pi/admin, I now have no LAN and no WiFi either

I'm turning router DHCP back on and calling it quits for the night, before I throw the pi out the window

Edit: turning router DHCP back on hasn't restored lan and WiFi. Which is a bother

I recommend you first enable Pi-hole's own DHCP service before switching off the one on the router.
You can check whats advertised via DHCP with below one:

sudo pihole-FTL dhcp-discover

Also make sure no firewalls in your network are blocking DHCP (UDP port 67):

Including the firewall running on the Pi-hole host (nftables):

sudo nft list ruleset

Might also want to check for legacy iptables:

sudo iptables -nL

Have you tried turning it off and on again :wink:

That gave me a lot of info, but I think the relevant bits are

548 bytes from 192.169.0.1 @ eth0

Offered IP address 192.168.0.2

Server IP address 192.168.0.1

Dns-server 194.168.4.100

Dns-server 194.168.8.100

303 bytes from 192.169.0.2 @ eth0

Offered IP address 192.168.0.111

Server IP address 192.168.0.2

Dns-server 194.168.0.2

That did nothing at all

Sudo: iptables: command not found

I am not quite that tech illiterate thanks :expressionless_face:

Yes. Pc and phone have been restarted every time I've changed either of the DHCP settings

Dont keep them running both at the same time!
Only when switching you can keep them both active for a short time.

The dhcp-discover looks good.
If your clients cant connect or get an IP via DHCP, its something network/router related that I cant help you with without knowing allot more about the router (network topology etc).
It could be that wired and wifi are two different network segments on the router creating a barrier for DHCP:

Oh on another note, I believe suspect your ISP router doesnt do DNS caching bc the clients are directed to use the public ISP DNS servers instead of the router IP:

$ dig +short -x 194.168.4.100
cache1.service.virginmedia.net.

Does below reply with an IP?

dig +short @192.169.0.1 pi-hole.net

If not, you'd have to configure above ISP "Dns-server" addresses for DNS with nmtui.
Or one of the many public DNS providers which was previously suggested by @nprampage (Cloudflare, Google, Quad9 etc).