Safe to use systemd-resolved in conjunction with Pihole?

I'm sanity-checking a suggestion offered on the web (Claude AI, specifically). I have a Raspberry Pi 3b+ running Trixie with Network Manager. I'm on Pihole Core version 6.4.3 FTP v6.7 and Web v6.6.

I'm tinkering and trying to see if there's a way to have the Raspberry Pi itself perform Internet lookups using 9.9.9.9 (or any public DNS) and LAN lookups on my Pihole / Unbound setup. This is a bare-metal setup, no containers, etc. My Listening Behavior is setup for "Respond only on interface eth0".

Claude is suggesting I can install and run systemd-resolved and allow it to run its default behavior of using a resolver stub at 127.0.0.53:53, and this will not conflict with pihole-FTL wanting to use port 53 (Unbound using 127.0.0.1). Then setup nmcli to use a split DNS lookup behavior.

I am running this by folks who actually know what is going on to see if this is plausible. It looks good when I read it, but I've broken my setup enough times to know better than blindly trust AI output or even random Internet posts.

Just trying to see if this is worth pursuing, thanks!

You probably do NOT need an extra service. If you just want your RPi itself to use a non-Pi-hole DNS, just configure that in your network settings. This would be the same place and mechanism you used to assign the device a fixed IP address. In trixie, it could be NetworkManager/nmcli. The network set up will auto-create your /etc/resolve.conf with the servers you specified.

Thanks for the response. Yes, that's the right way to set DNS for the R-Pi. But when that's set to a public DNS, it understandably can't resolve my internal LAN machines. Hence the idea to split it out.

For local resolution 'on' my RPi, I just rely on mDNS (i.e. avahi). It works well enough if the devices needed can reply to the broadcast requests. It does mean I need to do machine_name.local vs just machine_name or machine_name.my.domain...but it works well enough for my limited uses from the RPi.

Yeah, I like that idea better than running extra services. However, that's not doing it for me...pinging hostnameand or hostname.home.arpa (my LAN domain) can't find it.

So the next question is, what can I check to see if mDNS is set up properly? I just assumed it was running by default, but maybe not.

You can't use .home.arpa (which is my domain as well). You must use the 'special domain' .local when doing a lookup. The systemd service for avahi may not be running or installed, depends on your trixie setup. I don't recall if I had to enable it or install it or it was already present.

systemctl status avahi-daemon.service would give you some answers.

Once running, ping machine.local to see if they respond/are found.

Right, I had the same result with .local but assumed that was because that wasn't my domain name.

It looks like avahi is running, to me...

sudo systemctl status avahi-daemon.service
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; enabled; preset: enabled)
Active: active (running) since Sun 2026-06-14 10:03:52 CDT; 3 weeks 3 days ago
Invocation: 34a8e971068147e887e3583e94f67719
TriggeredBy: ● avahi-daemon.socket
Main PID: 584 (avahi-daemon)
Status: "avahi-daemon 0.8 starting up."
Tasks: 2 (limit: 806)
CPU: 1h 24min 8.488s
CGroup: /system.slice/avahi-daemon.service
├─584 "avahi-daemon: running [raspberrypi.local]"
└─598 "avahi-daemon: chroot helper"

Jun 14 10:03:52 raspberrypi avahi-daemon[584]: New relevant interface lo.IPv6 for mDNS.
Jun 14 10:03:52 raspberrypi avahi-daemon[584]: Joining mDNS multicast group on interface lo.IPv4 with address 127.0.0.1.
Jun 14 10:03:52 raspberrypi avahi-daemon[584]: New relevant interface lo.IPv4 for mDNS.
Jun 14 10:03:52 raspberrypi avahi-daemon[584]: Network interface enumeration completed.
Jun 14 10:03:52 raspberrypi avahi-daemon[584]: Registering new address record for ::1 on lo.*.
Jun 14 10:03:52 raspberrypi avahi-daemon[584]: Registering new address record for 127.0.0.1 on lo.IPv4.
Jun 14 10:03:53 raspberrypi avahi-daemon[584]: Server startup complete. Host name is raspberrypi.local. Local service c>
Jun 14 10:03:58 raspberrypi avahi-daemon[584]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168>
Jun 14 10:03:58 raspberrypi avahi-daemon[584]: New relevant interface eth0.IPv4 for mDNS.
Jun 14 10:03:58 raspberrypi avahi-daemon[584]: Registering new address record for 192.168.3.200 on eth0.IPv4.

Then the machine you are 'pining' may not support or have mDNS running. The service ON the machine is more for 'advertising', less for looking up. Your RPi should be pingable from other machines with the .local suffix now. Apple for example uses mDNSResponder. Windows has something similar, but I can't recall, netbios? Not every device will support mDNS though. My IoT devices are larely not reachable with device.local.

HOLD THE PHONE! My mistake. The machine name I was testing on was sleeping...changed to another device and it worked.

This is a satisfactory solution, thank you!

Ah, glad you got success. Most computers have some form of mDNS running for 'ease of use'.

Been doing this a long time and there is still lots I learn every day!