DNS resolver issue after fresh install of PiHole and Unbound Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
keithellis
Posts: 53
Joined: Mon May 23, 2016 2:55 pm

DNS resolver issue after fresh install of PiHole and Unbound

Post by keithellis »

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.
User avatar
trendy
Posts: 342
Joined: Tue Feb 25, 2020 2:54 pm

Re: DNS resolver issue after fresh install of PiHole and Unbound

Post by trendy »

Code: Select all

cat /etc/resolv.conf 
head -n -0 /etc/resolvconf/resolv.conf.d/*
keithellis
Posts: 53
Joined: Mon May 23, 2016 2:55 pm

Re: DNS resolver issue after fresh install of PiHole and Unbound

Post by keithellis »

Here you go:

Code: Select all

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

Code: Select all

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
User avatar
trendy
Posts: 342
Joined: Tue Feb 25, 2020 2:54 pm

Re: DNS resolver issue after fresh install of PiHole and Unbound

Post by trendy »

Is it able to resolve with this nameserver?
nslookup dietpi.com
keithellis
Posts: 53
Joined: Mon May 23, 2016 2:55 pm

Re: DNS resolver issue after fresh install of PiHole and Unbound

Post by keithellis »

Code: Select all

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
keithellis
Posts: 53
Joined: Mon May 23, 2016 2:55 pm

Re: DNS resolver issue after fresh install of PiHole and Unbound

Post by keithellis »

I've just done an

Code: Select all

apt upgrade
and that worked fine, this is the error I'm getting with

Code: Select all

diet-software

Code: Select all

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>    
User avatar
trendy
Posts: 342
Joined: Tue Feb 25, 2020 2:54 pm

Re: DNS resolver issue after fresh install of PiHole and Unbound

Post by trendy »

Your nameserver is hijacking the queries.

Code: Select all

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
keithellis
Posts: 53
Joined: Mon May 23, 2016 2:55 pm

Re: DNS resolver issue after fresh install of PiHole and Unbound

Post by keithellis »

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.
User avatar
trendy
Posts: 342
Joined: Tue Feb 25, 2020 2:54 pm

Re: DNS resolver issue after fresh install of PiHole and Unbound

Post by trendy »

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