Video coming soon…
🌐 Setup Unbound — Recursive, Validating DNS Resolver
Deploy Unbound on Ubuntu with Docker — a fast, privacy-respecting recursive DNS resolver with DNSSEC validation that frees you from public DNS, on port 5335.
⚠️ This script is provided for demo and testing purposes only. Not intended for production use.
📦 Resources & Setup Scripts
Grab the automated bash script from GitHub to follow along with the video.
Quick Install:
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/networking/unbound/unbound-ubuntu.sh
chmod +x unbound-ubuntu.sh
sudo bash unbound-ubuntu.sh
Tutorial Steps
1 Download the Script
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/networking/unbound/unbound-ubuntu.sh
2 Make it Executable
chmod +x unbound-ubuntu.sh
3 Run the Installer
The script installs Docker if needed and starts Unbound on port 5335 (TCP and UDP) mapped to the container's DNS port 53, and opens the firewall for it. There's no web UI — Unbound is a pure DNS resolver.
sudo bash unbound-ubuntu.sh
4 Point Your Ad-Blocker Upstream and Test
In Pi-hole or AdGuard Home, set the upstream DNS to your-server-ip#5335. Confirm Unbound resolves and validates from your own machine:
dig @<your-server-ip> -p 5335 example.com
Ports Used
| Port | Purpose |
|---|---|
| 5335 | DNS (host → container 53, TCP + UDP) — no web UI |
| non-standard port | Chosen so it can run alongside Pi-hole on port 53 |
| upstream | Point Pi-hole / AdGuard at your-server-ip#5335 |