DietPi-Login DNS Resolver Not Working

Whenever my Pi attempts to login I get an error message saying that the DNS resolver failed. My internet is working.

Hi,

pls can you past the correct error message or a screen shot!

I tried it with cloudflare as well.

was this is a fresh installation? Do you use IPv6 on your network?

Yes, I just installed this and I use ipv6.

ok pls try to deactivate IPv6 on your dietpi system, Let’s see if IPv4 is working. got to dietpi.txt on your SD card and change the following.

# IPv6
CONFIG_ENABLE_IPV6=0

It’s still not working.

pls can you past output of following

ping -4 -c 1 dns9.quad9.net
ping -4 -c 1 9.9.9.9
ping -c 1 dns9.quad9.net
ping -c 1 9.9.9.9

root@DietPi:~# ping -4 -c 1 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=54 time=53.3 ms

β€” dns9.quad9.net ping statistics β€”
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 53.303/53.303/53.303/0.000 ms
root@DietPi:~# ping -4 -c 1 9.9.9.9
PING 9.9.9.9 (9.9.9.9) 56(84) bytes of data.
64 bytes from 9.9.9.9: icmp_seq=1 ttl=54 time=182 ms

β€” 9.9.9.9 ping statistics β€”
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 181.721/181.721/181.721/0.000 ms
root@DietPi:~# ping -c 1 dns9.quad9.net
PING dns9.quad9.net(2620:fe::fe:9 (2620:fe::fe:9)) 56 data bytes
ping -c 1 9.9.9.9

β€” dns9.quad9.net ping statistics β€”
1 packets transmitted, 0 received, 100% packet loss, time 0ms

root@DietPi:~# ping -c 1 9.9.9.9
PING 9.9.9.9 (9.9.9.9) 56(84) bytes of data.
64 bytes from 9.9.9.9: icmp_seq=1 ttl=54 time=206 ms

β€” 9.9.9.9 ping statistics β€”
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 205.500/205.500/205.500/0.000 ms


are you sure you deactivated IPv6 on your DietPi system? Because your system is still trying to access some IPv6 address, which should not be the case if IPv6 was disabled.

root@DietPi:~# ping -c 1 dns9.quad9.net
PING dns9.quad9.net(2620:fe::fe:9 (2620:fe::fe:9)) 56 data bytes
ping -c 1 9.9.9.9

--- dns9.quad9.net ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

pls can you past output of

cat /DietPi/dietpi.txt |grep CONFIG_ENABLE_IPV6
ip a

root@DietPi:~# cat /DietPi/dietpi.txt |grep CONFIG_ENABLE_IPV6
CONFIG_ENABLE_IPV6=0
root@DietPi:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:62:d5:fd brd ff:ff:ff:ff:ff:ff
inet 192.168.1.69/24 brd 192.168.1.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 2606:a000:1408:8269:ba27:ebff:fe62:d5fd/64 scope global dynamic mngtmpaddr
valid_lft 604509sec preferred_lft 604509sec
inet6 fe80::ba27:ebff:fe62:d5fd/64 scope link
valid_lft forever preferred_lft forever


did you reboot your system after you disabled IPv6? If not, pls do. Because you still have an IPv6 address assigned

yes, I did. Should I disable ipv6 on my router?

you can try, It’s strange that you have IPv6 addresses on your eth0 adaptor

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:62:d5:fd brd ff:ff:ff:ff:ff:ff
inet 192.168.1.69/24 brd 192.168.1.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 2606:a000:1408:8269:ba27:ebff:fe62:d5fd/64 scope global dynamic mngtmpaddr
valid_lft 604509sec preferred_lft 604509sec
inet6 fe80::ba27:ebff:fe62:d5fd/64 scope link
valid_lft forever preferred_lft forever

That worked. I’d like to keep ipv6 on though, is there another way to turn it off for the Pi?

you can go to

  1. dietpi-config tool
  2. 7 : Network Options: Adapters
  3. IPv6 : [Off]

this should deactivate IPv6 on your SBC. But this is the same setting as CONFIG_ENABLE_IPV6=0 within dietpi.txt file. If IPv6 was disabled, the command ip a should return an IPv4 address only.

1 Like

Thanks for your help

yw :sunglasses:

I made an account just to say thank you, the IPv6 was holding me back!

1 Like

I have the same issue. Sort of… Sometimes.

Ping -c 1 dns9.quad.net

Sometimes gives 100% packet loss.
Sometimes gives 1 received.

Iperf3 to a host on my network runs fine (speeds close to 1Gbps)

Do you have any idea what might be the cause? (Rock Pi 4B 1.72 on Dietpi with kernel 5.10.63)

P.s. IPV6 is disabled and ip a shows no ipv6 ip

Could it be a dns problem? And how should I investigate the cause? :-/