1

External DNS lookups work without issues, but anything for a non-FQ domain (i.e. only the hostname portion) fails unless I explicitly force it to use the PiHole to resolve it.

nslookup myhost # this fails with SERVFAIL
nslookup myhost 192.168.12.34 # this works

I'm confident the DNS entries are valid (added via the "Local DNS Records" interface on the PiHole) as they work from other systems on my network that aren't using systemd

/etc/resolv.conf is the systemd default (referring to 127.0.0.53) as I just did a fresh install two days ago.

resolvectl status shows the PiHole's IP as the sole DNS server for my wifi connection (the only active connection).

This is a fresh install of PopOS 20.04, and my PiHole was just updated to 5.0.

EDIT: To clarify, this host is not running PiHole - that's on another host on the network.

Anybody have any thoughts as to what's going on here?

Thanks for your time.

0

DNS does not recognize short names, i.e. host name only without additional information.

If you give nslookup a host name only, it will try to add whatever is configured as the search domain. This is usually in /etc/resolv.conf like this:

$ cat /etc/resolv.conf 
# Generated by NetworkManager
search domain.com
nameserver 10.0.0.1

If you do not have a search domain, or you are using the name of a host outside of the configured search domain, it will not resolve.

DNS needs a method to find the FQDN in order to resolve.

This is just my guess with the limited amount of information I have.

| improve this answer | |
0

Turns out the simplest way to do this was just to bypass the loopback resolver by pointing the resolv.conf symlink to another file (which contains my PiHole's IP):

sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.