Docker Community Forums

Share and learn in the Docker community.

Unbound DNS resolver returns with SERVFAIL in ubuntu:latest


I’m using unbound DNS resolver in a ubuntu container for my LAN requests. I’ve noticed, that ubuntu:latest is no longer work. The last image which is working ubuntu:bionic.
The issue is, that the unbound service is not able to handle upstream requests, returns with

** server can’t find SERVFAIL

The local requests are still working:

nslookup dns-server
[ output omitted ]
Name: # this is an advertising site

Interesting: With debian:latest it does provide the same issue.

Here you can find the Dockerfile, configs, and the command with which I’m running:

I’m looking for a solution why this stopped working.

Thank you

First, download the script and make it executable:

chmod +x
Then run it as root:

sudo ./

Change DNS resolver
Later, if you want to edit /etc/resolv.conf, run this command to allow modifications :

chattr -i /etc/resolv.conf (+i to disallow again)

DNSSEC should be enabled. To check if Unbound verifies DNSSEC signatures, run:

dig | grep status
Which should return status: SERVFAIL as the signature for this domain is broken.

Check for DNS leaks
Go to or with your browser. Only your IP should show up, or the one from your VPN provider.