BLOCK EVERYTHING w/ PiHole on Docker, OpenDNS and IFTTT

About this video

Note: this video’s caption track is in German. This is part two of a family network-filtering project, combining OpenDNS from the earlier video with Pi-hole running in Docker. The creator spins up an Ubuntu 20 virtual machine in the cloud, stops and disables systemd-resolved to avoid a DNS conflict, points resolv.conf at another resolver, installs Docker via apt (docker.io), and launches a customised Pi-hole container using a bash script taken largely from the Pi-hole project and hosted on his GitHub/Docker Hub. He changes the admin password from inside the container, sets OpenDNS as the upstream resolver in the Pi-hole settings, and verifies blocking with nslookup and the dashboard. The more playful layer is automation: inside the container a Flask/Python script (network.py) listens on port 8080 and runs shell scripts that add or remove regex blacklist entries for services such as Netflix, Hulu and Disney Plus. Those /block and /unblock URLs become IFTTT webhooks triggered by Alexa phrases, so a voice command can block or restore entertainment sites — with a warning that a home setup needs a public IP and port forwarding for IFTTT to reach it. He closes by saying that after a week about 26% of queries on his network were blocked.

Key takeaways

  • Run Pi-hole in Docker on Ubuntu by first disabling systemd-resolved so it does not compete for DNS, then installing docker.io and launching the container from a script.
  • Change the Pi-hole admin password from inside the container and set OpenDNS as the upstream resolver to combine Pi-hole ad blocking with OpenDNS content filtering.
  • Point a device’s DNS at the Pi-hole address and test with nslookup and the dashboard/query log to confirm queries are flowing and being blocked.
  • Automate blocking with a small Python/Flask endpoint on port 8080 that runs regex block/unblock shell scripts against the Pi-hole blacklist.
  • Connect that endpoint to Alexa through IFTTT webhooks; a private home address requires a public IP and router port forwarding for IFTTT to reach it.

Episode details: published May 2, 2020 · 18:38 long. Summary written by Self Growth Videos from the episode itself. Business results and any income figures mentioned are NetworkChuck’s own claims, shared for education — they are not typical or guaranteed.


← Previous: block ADULT sites and other BAD STUFF on your home network (EASY) · Next: you need to learn Ansible RIGHT NOW!! (Linux Automation) →

All NetworkChuck videos · NetworkChuck profile · NetworkChuck on YouTube

Sister brand · Vacation Club Promo

All-inclusive resort stays from $435

Qualified couples: promotional Mexico and Caribbean packages at real resorts. Short presentation during your stay — enjoy the rest of the trip.

Qualifications apply · presentation during stay · no purchase required

Subscribe YouTube Suggest