| config | New pihole version breaks dnssec; disabling. | |
| .env.example | Back to using unbound for recursive DNS. Dropped cloudflared. | |
| .gitignore | Back to using unbound for recursive DNS. Dropped cloudflared. | |
| docker-compose.yml | New pihole version breaks dnssec; disabling. | |
| LICENSE | Add LICENSE | |
| README.md | Back to using unbound for recursive DNS. Dropped cloudflared. | |
Secure DNS
Overview
A dockerized setup for Pihole (ad block) + unbound (recursive mode).
Requirements
- docker
- docker-compose
Setup (Linux & macOS)
Clone this repo on the computer you want to use as a secure DNS server.
Copy .env.example to .env and make the appropriate changes.
To start up, run
docker compose up -d
Now you can change your router/device DNS to the server IP.
Updating .env
After making changes to .env you'll need to restart the docker network.
docker compose down && docker compose up -d
Auto start (Linux + macOS)
Add the following to your crontab:
@reboot /bin/bash -c "cd <working_path-secure-dns>/ && docker compose up -d"
Upgrading
To upgrade pihole when there's new releases run (make sure you run the upgrade while secure-dns is running):
docker compose pull && docker compose up -d
This will pull the latest docker images, build then restart the affected containers.
Using secure-dns as your DNS resolver
Once secure-dns is up and running, change your DNS to 127.0.0.1.
You're done!
Test your connection for leaks.
Because we're in recursive mode, the only result should be your server's IP.
Auto upgrade with Pullio
If you'd rather not think about upgrading, you can install pullio, and secure-dns should be supported.
Just make sure you watch out for breaking changes.
Attribution
Software
madnuttah/unbound-docker