Video coming soon…
🌐 Setup Blocky — Fast, Lightweight DNS Ad-Blocker
Deploy Blocky on Ubuntu with Docker — a fast, single-binary DNS proxy that blocks ads and trackers network-wide from a simple YAML config, DNS on port 5354.
⚠️ 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/blocky/blocky-ubuntu.sh
chmod +x blocky-ubuntu.sh
sudo bash blocky-ubuntu.sh
Tutorial Steps
1 Download the Script
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/networking/blocky/blocky-ubuntu.sh
2 Make it Executable
chmod +x blocky-ubuntu.sh
3 Run the Installer
The script installs Docker if needed and starts Blocky with DNS on port 5354 (TCP and UDP) and its API on 4002, all configured by config.yml — which ships with sensible upstreams and a starter blocklist.
sudo bash blocky-ubuntu.sh
4 Point a Device and Test Blocking
Set a device's DNS to your-server-ip (port 5354), then confirm a normal domain resolves and a known ad domain is blocked:
dig @<your-server-ip> -p 5354 doubleclick.net
Ports Used
| Port | Purpose |
|---|---|
| 5354 | DNS (host → container 53, TCP + UDP) — point devices here |
| 4002 | HTTP query API + Prometheus metrics (host → container 4000) |
| config.yml | The single YAML file that configures blocklists and upstreams |