I have setup pi-hole on my raspian buster and it works as intended for clients (IPv4 and IPv6). The host on which pi-hole is running, however, cannot resolve any addresses.

My Pi has a static IPv4 address and my /etc/dhcpcd.conf looks like this:

interface eth0
static ip_address=
static routers=
static domain_name_server=

From this resolvconf automatically generates a resolv.conf like this:

nameserver fe80:ba27:ebff:fe4e:c4ff::%eth0

But with it name resolution on the RaspberryPi does not work anymore (all other clients still resolve names correctly using pi-hole).

  • If I remove at least one of the trailing colons (or both) it works and uses IPv4 to resolve addresses. For it to use IPv6 I need to add a colon after the first group (i.e. fe80::...).
  • Likewise issuing nslookup google.com fe80:ba27:ebff:fe4e:c4ff::%eth0 fails with connection timed out; no servers could be reached.
  • Issuing nslookup google.com fe80::ba27:ebff:fe4e:c4ff::%eth0 fails with nslookup: couldn't get address for 'fe80::ba27:ebff:fe4e:c4ff::%eth0': not found.
  • What works is nslookup google.com fe80::ba27:ebff:fe4e:c4ff%eth0 (notice the double colon at the beginning and the missing colon at the end).

I do not understand what is happening.

  • What am I doing wrong in my configuration?
  • Why does the generated resolv.conf only contain an IPv6 address and no IPv4?

2 Answers 2


If you just want to resolve a few LAN names locally (that is, on the Pi itself), just add those names to /etc/hosts, e.g.:   laptop.lan   printer.lan

If you want to run an actual DNS server, you could start by trying out systemd-resolved, which can be configured by editing /etc/systemd/resolved.conf. Depending on your needs, this could be sufficient.

  • I want to use the local installation of pi hole as DNS server
    – sigy
    Commented Jan 29, 2021 at 11:10

It turns out I had a typo in my configuration. The option for a static DNS in dhcpcd.conf is domain_name_servers. In my configuration the trailing s was missing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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