ping *any domain*
DNS never resolves on the machine hosting Pi-hole.
First time using Pi-hole. I am trying to follow Method 2 of this guide to have my router running OpenWRT 21.02.1 advertise the server Pi-hole is on as the DNS server of all the devices connected to the network.
The router and Pi-hole work perfectly fine together after following this guide for every device connected except the machine running Pi-hole where DNS resolution is completely broken after installing Pi-hole.
apt is non-functional, and if I
ping any domain I get "Temporary failure in name resolution." I know there are posts all over about this issue, but none of the solutions provided within those threads have worked for me permanently -- the solution in this thread worked temporarily, but the next reboot nullified it, and DNS was broken again.
I would like to use Pi-hole as the DNS resolver for the machine it is installed on -- if I edit
/etc/resolv.conf to include
nameserver 127.0.0.1 instead of the default
nameserver 127.0.0.53 I get "Name or service not known" when using
ping. Switching the nameserver to literally any other functional resolver will get the machine to work immediately every time. I am quite certain this is not a Pi-hole issue but an Ubuntu one. I am running Ubuntu 20.04.3 and using NGINX as the webserver for the admin interface (which I know is not the issue at all because the web interface works perfectly).
Per the instructions for Method 2 on that guide the Pi-hole has no other upstream DNS resolvers defined except for 192.168.1.1, the address of my router. My router is advertising the server's internal address via
dnsmasq through the DHCP option "6,address of server" set by navigating to "Network -- Interfaces -- LAN -- Edit -- DHCP Server -- Advanced Settings -- DCHP Options." The Ubuntu settings page for my connection has DNS set to automatic.
Things I have tried that did not work:
/etc/resolv.confto only include
nameserver 127.0.0.1instead of
Using the package
resolvconfto make above changes to
/etc/resolv.confpersist upon reboot
Disabling the options "Never forward non-FQDNs" and "Never forward reverse lookups for private IP ranges" in the Pi-hole settings
Thanks so much for any help! I know that the solution to this will be very simple and is just something I'm not seeing because I've been trying to resolve this issue for too long.