#StackBounty: #networking #dns DNS resolution failing after a few hours

Bounty: 100

I am using Ubuntu Server 20.04.2 LTS on a raspberry pi 4 8gb. DNS resolution stops working after a few hours after reboot. A reboot solves the issue but it’s just a band-aid. My DNS is set to and

I have tried running tcpdump -n -i eth0 host and dig @ www.google.com simultaneously and the output is

listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
22:06:51.643074 IP > 6359+ [1au] A? www.google.com. (55)
22:06:51.651180 IP > 6359 1/0/1 A (59)

(The IP of the device is

NSLookup also fails, running the following: nslookup www.google.com returns

;; connection timed out; no servers could be reached

I would like the DNS to not break every 6 hours or so and rebooting it every time it breaks is a little inconvenient.


Running telnet returns this:

root@najemi:~# telnet to
telnet: could not resolve to/ Servname not supported for ai_socktype

Running tcpdump without any arguments returns this

Date looks about right:

root@najemi:~# date
Sat Jul  3 05:14:10 UTC 2021

sudo tcpdump -n -i eth0 host while running dig +cdflag @ www.google.com returns:

listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
05:18:07.377351 IP > 37809+% [1au] A? www.google.com. (55)
05:18:07.422270 IP > 37809 1/0/1 A (59)

IP is static.

Also thought I’d mention that these problems started arising after installing pihole. It has since been uninstalled yet the problems remain.

Edit 2:

Contents of /etc/resolv.conf are:

# Generated by dhcpcd from eth0.dhcp
# /etc/resolv.conf.head can replace this line
# /etc/resolv.conf.tail can replace this line

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.