DNS resolver issue after fresh install of PiHole and Unbound

Hi,
I have a fresh DietPi install with PiHole and Unbound installed. PiHole appears to be working well. I wanted to add in a white list, but the script required Python. I went to check dietpi-software to see if Python was an install option, but dietpi-software is not starting. I’m getting a DNS resolver error. Any idea how I can fix this.
Thanks.

cat /etc/resolv.conf 
head -n -0 /etc/resolvconf/resolv.conf.d/*

Here you go:

root@DietPi:~# cat /etc/resolv.conf
nameserver 192.168.54.1



root@DietPi:~# head -n -0 /etc/resolvconf/resolv.conf.d/*
head: cannot open '/etc/resolvconf/resolv.conf.d/*' for reading: No such file or directory

Is it able to resolve with this nameserver?
nslookup dietpi.com

root@DietPi:~# nslookup dietpi.com
Server:		192.168.54.1
Address:	192.168.54.1#53

Non-authoritative answer:
Name:	dietpi.com
Address: 104.21.96.47
Name:	dietpi.com
Address: 172.67.173.4
Name:	dietpi.com
Address: 2606:4700:3035::ac43:ad04
Name:	dietpi.com
Address: 2606:4700:3034::6815:602f

I’ve just done an

apt upgrade

and that worked fine, this is the error I’m getting with

diet-software



RPi 2 Model B (armv7l) | IP: 192.168.54.10tware ├──────────────────────────────┐
│ Checking DNS resolver                                                        │
│  - Command: ping -c 1 -W 10 dns9.quad9.net                                   │
│  - Exit code: 1                                                              │
│  - DietPi version: v7.0.2 (MichaIng/master) | HW_MODEL: 2 | HW_ARCH: 2 |     │
│ DISTRO: 5                                                                    │
│  - Image creator: DietPi Core Team                                           │
│  - Pre-image: Raspberry Pi OS Lite                                           │
│  - Error log:                                                                │
│ PING dns9.quad9.net (81.130.111.239) 56(84) bytes of data.                   │
│                                                                              │
│ --- dns9.quad9.net ping statistics ---                                       │
│ 1 packets transmitted, 0 received, 100% packet loss, time 0ms                │
│                                                                              │
│    Retry          : Re-run the last command that failed                 ↑    │
│    DietPi-Config  : Edit network, APT/NTP mirror settings etc           ▮    │
│    Open subshell  : Open a subshell to investigate or solve the issue   ▒    │
│    Send report    : Uploads bugreport containing system info to DietPi  ▒    │
│                   ●─ Devs only ──────────────────────────────────────●  ↓    │
│                                                                              │
│                                                                              │
│                     <Ok>                         <Exit>

Your nameserver is hijacking the queries.

dietpi@RockPi:[/opt/jackett/Jackett]$ ping -4 dns9.quad9.net
PING dns9.quad9.net (9.9.9.9) 56(84) bytes of data.
64 bytes from dns9.quad9.net (9.9.9.9): icmp_seq=1 ttl=58 time=30.6 ms

Instead your nameserver is resolving to 81.130.111.239 which doesn’t respond to pings, hence dietpi-software is failing.
Try to change the resolver in /etc/resolv.conf into 8.8.8.8

This is working now, thanks very much.

I have another DietPi setup with the same name server, but that works fine. Very strange.
Appreciate your time.

You’re welcome! You can mark this topic as solved in case of similar queries.