Simple DNS AD Blocker for Raspberry Pi all models | OpenMediaVault – 2020

In this segment, we are going to she yo how to set up a “Simple DNS AD-Blocker for Raspberry Pi all models – 2020″

DNS AD-Blocker?

DNS Ad-Blocker is a lightweight dnsmasq DNS server to block traffic to known ad servers with optional DNSCrypt support. Supports x86_64 and Raspberry Pi (armhf).

This image is using the blacklists created by oznu/dns-zone-blacklist and StevenBlack/hosts.

The DNS server works by returning NXDOMAIN when a DNS lookup is made by a browser or device to a blacklisted domain. This tells the browser the DNS record for a domain name could not be found which means the browser won’t even attempt a connection.

If you have found a host you think should be blacklisted please submit an issue on the upstream blacklist, StevenBlack/hosts, as the aim of this project is not to maintain yet another blacklist.

Full credit for this tutorial goes to oznu

OpenMediaVault Versions :

OpenMediaVault 5 Installation Guide :

Software Required :

Equipment Required Optional
Raspberry Pi Raspberry Pi 4 Case
SD_Card SD Card Raspberry Pi Keyboard
Ethernet Ethernet Cable Mouse
Charger Power Adapter    
HDD External HDD    
Shop now

  • To start the practical we need to use the below-given parameters, either we can SSH Raspberry Pi and use the below-given command as shown in the video or we can go ahead and configure container using Portainer.


docker run --restart=always \
  -p 53:53/tcp -p 53:53/udp \
  -e DEBUG=0 \
  -e NS1= -e NS2= \
  -e AUTO_UPDATE=1 \
  -e BRANCH=master \
  -e DNSCRYPT=0 \
  -v </path/to/config>:/config \
  • To resolve the Port 53 bind issue, you need to use the below-given commands.

sudo systemctl disable systemd-resolved.service
sudo systemctl stop systemd-resolved
  • Once the setup finishes we can go ahead and update our router DNS setting to our OpenMediaVault Address.


  • DNSCrypt is a protocol that authenticates communications between a DNS client and a DNS resolver. It uses cryptographic signatures to verify that responses originate from the chosen DNS resolver and haven’t been tampered with.

Updating DNS AD-Blocker IP Address to Router DNS

  • Now, we need to log in to our Router and then Navigate to DNS Settings.
  • Followed by, entering the OpenMediaVault IP Address to our Router Primary DNS Address.
  • After that, the traffic can route through the Raspberry Pi and Block ads with Pi-Hole.

Primary DNS Address   : "OpenMediaVault IP Address"
Secondary DNS Address : "Cloudflare DNS Address i.e"

router DNS

In conclusion

  • You are all set to use Raspberry Pi as DNS Ad-Block Server.
  • If you face any issue regarding this article please share your thoughts.
  • Enjoy the AD free web browsing experience with your Raspberry Pi and Openmediavault.

Need to go through Articles

Did you find us helpful?

Subscribe our YouTube Channel YouTube
Support us on Patreon Patreon
Like us on Facebook facebook
Share This Article with others

Harish Kumar

As a founder of the PcMac YouTube channel and website, Our goal is to provide Free Technical help to people and spread knowledge to everyone.
0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments