PiHole (DNS resolution is unavailable)

can you share ss -tulpn


Netid   State    Recv-Q   Send-Q     Local Address:Port     Peer Address:Port   Process
udp     UNCONN   0        0              127.0.0.1:5335          0.0.0.0:*       users:(("unbound",pid=1146,fd=3))
udp     UNCONN   0        0                0.0.0.0:53            0.0.0.0:*       users:(("pihole-FTL",pid=6814,fd=4))
udp     UNCONN   0        0                   [::]:53               [::]:*       users:(("pihole-FTL",pid=6814,fd=6))
tcp     LISTEN   0        256            127.0.0.1:5335          0.0.0.0:*       users:(("unbound",pid=1146,fd=4))
tcp     LISTEN   0        80             127.0.0.1:3306          0.0.0.0:*       users:(("mariadbd",pid=1147,fd=54))
tcp     LISTEN   0        1024             0.0.0.0:80            0.0.0.0:*       users:(("lighttpd",pid=1256,fd=5))
tcp     LISTEN   0        1000             0.0.0.0:22            0.0.0.0:*       users:(("dropbear",pid=1088,fd=3))
tcp     LISTEN   0        32               0.0.0.0:53            0.0.0.0:*       users:(("pihole-FTL",pid=6814,fd=5))
tcp     LISTEN   0        511            127.0.0.1:6379          0.0.0.0:*       users:(("redis-server",pid=1092,fd=7))
tcp     LISTEN   0        5              127.0.0.1:4711          0.0.0.0:*       users:(("pihole-FTL",pid=6814,fd=10))
tcp     LISTEN   0        1024                [::]:80               [::]:*       users:(("lighttpd",pid=1256,fd=4))
tcp     LISTEN   0        1000                [::]:22               [::]:*       users:(("dropbear",pid=1088,fd=4))
tcp     LISTEN   0        32                  [::]:53               [::]:*       users:(("pihole-FTL",pid=6814,fd=7))

The crazy thing is, that the forum here runs with pihole as DNS :smiley: that’s crazy

First thing, reboot your DietPi device.

Is /etc/resolv.conf still pointing to a global public upstream DNS provider?

Next, did you already install tcpdump? If yes, open a 2nd SSH session and execute following:

tcpdump -i any -c500 -nn port 53 or port 5335

In the first SSH session run

dig @127.0.0.1 google.com

Now, cancel tcpdump in the 2nd session and post your output.

that solves the problem! Thanks!
I rebooted it already, but before I changed the recolv.conf. So as it seems, I needed to reboot after changing the resolv.conf.

The strange thing is. It worked everything well (with the already dead IP in the resolv.conf) for a while and suddenly it stoped to work.

did you switched back to unbound (inside PiHole)? Is it still working?

always recommended to reboot your system after changing network configurations.

Perhaps your system has been using a DNS cache for a while until it tries to update DNS records? Who knows.

yes, it runs with unbound.

ah, ok, that could be the point.

anyway, thanks a lot!

One more question on this topic :slight_smile:

After hard reset (just turned off all network hardware in the night), I got no DNS resolution. Ping worked and gravitiy update worked. The solution was, just rebooting odroidN2 (with PiHole running on it). Why do I need a reboot after hard reset?

did you reboot your DietPi system same time as the rest of your network? Maybe the unbound service was not starting up correctly as the DietPi device was up before rest of network.

After the hard reset, I rebooted just the DietPi (on OdroidN2). But the unbound runs also on the same DietPi. Or do you mean, that after hard reset the start may go the wrong way?

yes, after you have booted up your entire network again, check all services. Check that both unbound and pihole are working correctly. I suspect that your N2 is starting up faster than the rest of your network, which is causing some problems.

yes, that makes sense! Thanks!