There is pi(hole) on your Dockers. How to stop ads with a pihole: Raspbian and Docker version!

Written by mikefettis | Published 2018/12/15
Tech Story Tags: raspberry-pi | docker | ad-blocking | automation | devops

TLDRvia the TL;DR App

https://pi-hole.net/

When writing this blog post, originally I was just going to talk about installing pihole on raspbian. But then I found out that pihole can run in docker. Personally I love my raspberry pis but I’d rather not have another piece of hardware in the lab when there is a perfectly good docker host.

Instead of getting all wordy with the install lets cut right to the chase with the TLDR version to get it running on a pi and in docker. Enjoy, an explanation will follow.

Alright now we have installed pihole and it is running and blocking ads on our local network. But what is it doing and how? Some people may not care how it works, those out there that do care, keep reading.

Pihole consists of a number of systems that make it work, the heavy lifters are core, gravity, and ftldns. The docs for pihole state,“The core script of Pi-hole provides the ability to tie many DNS related functions into a simple and user friendly management system, so that one may easily block unwanted content such as advertisements.” Ftldns is the dns engine that is powering everything. This means ftldns is going to act as a forwarding dns server, where if it doesn’t know a dns response it will forward it on. However when it detects a dns entry for an ad network, pihole will not forward that request on, and simply blackhole it. There are also a number of more user friendly commands for adding custom entires, updating and managing the dns server. Then the gravity module is the feature that allows for all the custom whitelists and blacklists to be fed into the system. The gravity module also supports a variety of regex for your own custom entries.

Thats pretty much it. There is much more in the weeds on each of these subsystems but then its reading documentation. All the documentation link have been included below.

The pihole command - Pi-hole documentation_The core script of Pi-hole provides the ability to tie many DNS related functions into a simple and user friendly…_docs.pi-hole.net

The pihole command/gravity - Pi-hole documentation_The core script of Pi-hole provides the ability to tie many DNS related functions into a simple and user friendly…_docs.pi-hole.net

Overview - Pi-hole documentation_DNS ™ ( pihole-FTL) offers DNS services within the Pi-hole ® project. It provides blazing fast DNS and DHCP services…_docs.pi-hole.net

Pi-hole®: A black hole for Internet advertisements_curl -sSL https://install.pi-hole.net | bash Docker install: docker pull pihole/pihole Our code is completely open, but…_pi-hole.net

pi-hole/pi-hole_A black hole for Internet advertisements. Contribute to pi-hole/pi-hole development by creating an account on GitHub._github.com

pi-hole/docker-pi-hole_Pi-hole in a docker container. Contribute to pi-hole/docker-pi-hole development by creating an account on GitHub._github.com

Download Raspbian for Raspberry Pi_Raspbian is the Foundation's official supported operating system. You can install it with NOOBS or download the image…_www.raspberrypi.org

Install Pi Hole | Pi Hole Ad Blocker with Pi Zero W | Adafruit Learning System_Zap away ads using an ad-blocking custom DNS mini server_learn.adafruit.com

Announcing 1.1.1.1: the fastest, privacy-first consumer DNS service_Cloudflare's mission is to help build a better Internet. We're excited today to take another step toward that mission…_blog.cloudflare.com


Written by mikefettis | hacker and janitor building platforms and systems that when they work no one knows they are there.
Published by HackerNoon on 2018/12/15