Pi-hole on Raspberry Pi

by Volker Weber

ZZ0C2D6B5A

Yesterday I finally got around to install Pi-hole. Jens asked me how Homebridge was doing and I remembered that yes, I have a Raspberry Pi chugging along without giving me any headaches. Time to SSH into the little machine and upgrade all the software as well as installing Pi-hole. Which in itself is pretty painless. If you use IPv6, I suggest you first set your Fritzbox to always assign ULAs, because FD00:: is the prefix you want for the local address of your Pi-hole. I told Pi-hole to resolv addresses via my Fritzbox, so that DNS in my local network continues to work.

After you installed it you instruct your router/Fritzbox to announce your new DNS forwarder to all clients via DHCP. Each connected device will resolv via Pi-hole, which resolves via Fritzbox, which in turn resolves via whatever you set as your DNS server on the Internet.

Why did I do this? Pi-hole filters out all requests for ad servers and tracking services. Which means that I finally can read Spiegel Online in Firefox without the site telling me I need to remove my ad blocker which I did not even have in Firefox. But since the site discovered that it could not track me, it denied access. All is good now since the code that checks for ad blocking cannot even load.

This is filtering at the net level and can break things. This is not a beginner's practice.

Anyway, brilliant. We just got ahead in the rat race. For now ...

ZZ789BB31B

If you want to run your Raspberry Pi headless, that is without screen, keyboard and mouse, you need commandline access via SSH. A SSH client is pre-installed on a Mac. On Windows, make sure you have the optional OpenSSH client installed.

WindowsOpenSSH

More >

Comments

That is how I got rid of the ads on my Samsung TV. It liked to pop up stuff in the Smart Hub that I didn’t care for. Now that’s gone.

I’m running it on a small OrangePI Zero - no need for a full-sized Raspberry Pi 3. It’s powered by on of the USB ports of my router and taped on top of it.

Jochen Schug , 2018-05-20

I prefer to get the fullsize Raspberry. https://amzn.to/2IDyVxX You never know what you are going to throw at it.

Volker Weber, 2018-05-20

The Raspberry with PiHole is really great, especially if you also use it as DNS-over-HTTPS forwarder. In this case you have the benefit of no more ads and a secure way of doing DNS queries.

Michael Spreitzenbarth, 2018-05-20

Pi-hole does a great job!
Is there a reason for using OpenSSH instead of PuTTY? Is it easier to install it use?

Clemens Müller, 2018-05-20

PuTTY is different. And that has bit me time and again. I'd rather have the standard.

Volker Weber, 2018-05-20

A great putty alternative (and much more) is MobaXterm, if you want a modern ssh-client on windows (customizable to the max, but it's worth it)

Patric Stiffel, 2018-05-20

Sehr guter Tipp. Danke, Patric.

Volker Weber, 2018-05-20

Ok, now I’m interested in trying Pi-hole, but weather is too good and we’re helping out on a community event. Maybe tomorrow.

Terminus for iOS turns the iPad into a good Raspi front end :)
Enables tinkering from couches and deck chairs.

Tobias Hauser, 2018-05-20

The newest Windows 10 has an SSH client you can activate using powershell.

Here is a link to the MSDN blog with instructions.
https://blogs.msdn.microsoft.com/powershell/2017/12/15/using-the-openssh-beta-in-windows-10-fall-creators-update-and-windows-server-1709/

Darryn sullivan, 2018-05-20

Thanks, Darryn. That is exactly the feature I am talking about. You can just add it as an Optional Feature or through the same Powershell command. It is no longer in beta; five months have passed since this post.

Volker Weber, 2018-05-20

With a blacklist activated in your Fritzbox you nearly can have the same experience without the need for a additional device. I manage a short block-list which cleans out a lot of garbage: https://gaehn.org/articles/werbung-mit-der-fritzbox-filtern/

René Fischer, 2018-05-20

Kann man machen. Aber es macht schon einen Unterschied, ob man 150 handverlesene Hosts blockiert oder mehr als 120.000. Es geht ja nicht nur um Werbung, sondern auch um Tracking. Und der Raspberry? Eh-da-Kosten. Den brauche ich sowieso.

Volker Weber, 2018-05-21

Danke, Volker!

Habe pi-hole gerade in einem Docker-Container angeworfen, mit Cloudflare als upstream DNS. Works. :)

Jean Pierre Wenzel, 2018-05-21

Sehr cool. Was kostet Dich das?

Volker Weber, 2018-05-21

Nix außer Strom. :)

Docker lief ohnehin zu Hause schon (auf dem NAS); pi-hole gibt es schon als fertiges Docker-Image (https://hub.docker.com/r/diginc/pi-hole/), muss nur entsprechend konfiguriert werden.

Die Clients schicken DNS-Anfragen an pi-hole, von dort weiter zur Fritz!Box (damit ich lokale Namen auflösen kann). In der Fritzbox ist 1.1.1.1 (Cloudflare) als upstream DNS eingetragen: https://blog.cloudflare.com/announcing-1111/

Jean Pierre Wenzel, 2018-05-21

Jean Pierre: IPv4-only?

Peter Siering, 2018-05-22

Momentan ja (zwischen geweckt werden und Raubtierfütterung der Kids am Feiertag morgen zusammen geklöppelt). Sollte aber auf IPv6 erweiterbar sein.

Jean Pierre Wenzel, 2018-05-22

Seit Sonntag verrichtet Pi-hole auf dem Raspi seinen Dienst.
1. ULA wie von Volker erwähnt immer vergeben lassen.
2. Pi-hole installieren.
3. Auf der Fritzbox DNS der Wahl eintragen, also 1.1.1.1, 8.8.8.8 etc. Bei mir sind es zum Testen DNS-Watch und als secondary der DNS meines Providers.
4. In Pi-hole die Fritzbox als custom DNS eintragen, bei IPv4 und V6. Alle anderen DNS abwählen.
5. In der Fritzbox im DHCP Dienst den Raspi mit Pi-hole als DNS an die Clients vergeben lassen. IPv4 und v6 haben jeweils ihre eigenen Einträge.

Wenn man 1. vergessen hat tut's übrigens das bei Pi-hole enthaltene uninstall Script und ein neuer Install wenn man 1 nachgeholt hat :)

So funktioniert das bei uns für IPv4 und v6. Letzteres ist für mich neu. Der Provider hat uns auf v6 umgestellt, da kommt der Test und die Beschäftigung danit ganz Recht.

Tobias Hauser, 2018-05-23

79 Clients im Netzwerk?! Respekt :)

Stephan Herz, 2018-05-29

Fun fact: Platz 1 meiner gefilterten Anfragen nimmt msmetrics.ws.sonos.com ein. Innerhalb der letzten 10 Minuten wollte mein System da 32 Anfragen stellen bei der morgendlichen Wohnungsbeschallung (1 Play:5, 1 Connect, 1 Play:1 und 2 Play:1 als Stereo Pärchen)

Torsten Pinkert, 2018-05-31

Gerade getestet: mit der Liste von Rene läuft der FireTV nicht mehr sondern sagt nur "Netzwerkprobleme" und blinkt orange. Sieht so aus, als ob der "amazon-adsystem.com" und weitere Seiten dringend kontaktieren muss, damit er läuft. Was ein Drecksding und ja, works as designed. Aber trotzdem, saubere Fehlermeldungen wären da hilfreich, es hat eine Weile gedauert, bis ich drauf kam, woran es liegen könnte (nutze den ja nicht täglich, nach power on/off, neu verkabeln, Wifi neu einrichten etc...).
Das ist jetzt kein moppern gegen die Liste oder Pi-Hole sondern gegen Hersteller, die Werbung/Werbedomais verpflichtend hart verdrahten.

Daniel Bott, 2018-06-02

amazon-adsystem.com ist bei mir geblockt. Trotzdem laufen Fire TV und Alexa problemlos...

Michael Urspringer, 2018-06-02

@Michael - ich hab jetzt nicht mehr jede Domain geprüft, ich war dazu dann nach der Fehlersuche nicht in der Stimmung. Fakt ist: die Filterliste von oben in den Router und aktivieren = FireTV sagt Netzwerkprobleme. Liste raus, FireTV geht. Von daher ist das generelle Statement valide: wenn FireTV nicht an ein Ad-Net kommt, macht er dicht und das ist doof. Wenn ich mal viel Zeit über habe, teste ich mal, welcher der 145 Domains da zieht. Gerade habe ich aber besseres vor....

Daniel Bott, 2018-06-02

Bei mir funktioniert der Fire TV Stick- allerdings läuft die Prime App auf meinem Sony Android TV nicht mehr.

Die Echos funktionieren ebenfalls problemlos.

Oliver Barner, 2018-06-02

Old vowe.net archive pages

I explain difficult concepts in simple ways. For free, and for money. Clue procurement and bullshit detection.

vowe

Paypal vowe