Pi-hole® und was du dazu wissen musst

Pi-hole® and what you need to know about it

If you install Pi-hole® in your home network, it integrates an effective ad blocker for all devices that run at home via LAN or WLAN – so you no longer need to install a separate ad blocker on your devices (PC, mobile phone, etc.). Superuser @kaetho opted for Pi-hole and documented the process in detail.

The hardware

The following equipment is recommended to make sure everything runs smoothly from the start:

  • Raspberry Pi (e.g. Raspberry Pi 4, Model B with 4GB Ram)
  • Power supply
  • Memory card
  • Housing
  • An HDMI cable, if required (e.g. for the Raspberry Pi 4, as it has two micro-HDMI ports rather than a standard HDMI connection)

Software

The starter kit includes an SD card with everything you need to get going. This includes the RasPi installation programme NOOBS. The instructions from heise.de and elefacts.de. will help you with the installation. We recommend that all the hardware, i.e. mouse, keyboard, screen (HDMI cable for the connection with Micro-HDMI to HDMI) and network cable, is connected for the initial installation.

Integrating into the network

If you have a PoE switch, i.e. the Raspberry Pi is integrated into the rack, you will need to purchase a PoE hat for the Raspberry Pi. This means that the Raspi can be placed in the rack where it receives its power and you won’t need an additional power supply unit. With management carried out via the network (browser, remote desktop), the Raspi no longer needs a mouse, keyboard and screen. The Raspberry Pi IP must be included: to do this, we recommend leaving the Raspi itself on DHCP, searching for the IP address of the Raspberry Pi in the web portal of Internet-Box  and fixing it there.

You must then restart the Raspberry Pi. It is worth converting it directly to a PoE-powered device to connect the Raspberry Pi directly to a LAN port of the PoE switch without any other peripherals.

02-Raspi mit Netzwerkanschluss und Stromversorgung über PoE.jpg

The housing currently installed by superuser and co-author kaetho. “I couldn’t find a suitable, simple housing that could be combined with the PoE attachment (board with fan). There are now two Raspis: the left one is the Pi-hole, the right one is a Minecraft server.”

DHCP settings from the router

Wenn du in den DCHP-Einstellungen vom Router den DNS-Server auf den Pi-hole Server setzen möchtest, machst du im Web-Portal der Internet-Box die folgenden Einstellungen:

If you want to set the DNS server to the Pi-hole server in the DCHP settings of the router, adjust the following settings in the web portal of the Internet-Box: Go to “Network” > “Settings” and change DNS server 1 to the Raspberry Pi’s fixed IP address. However, leave DNS server 2 at the default value. Activate DHCP option 6 so that the Pi-hole recognises the exact requests of the devices.

03-DNS-Server über DHCP-Option 6.jpg

The result

If you now enter the IP address of your Pi-hole in the browser followed by “/admin” (i.e. 192.168.1.xx/admin), the Pi-hole dashboard will appear. This gives you some information about the current status. You can see an even more detailed display when you log in.

04-Portal pihole.jpg

From now on, adverts will be blocked and suppressed as far as possible on all clients in your home network. However, there are limitations: adverts on YouTube via mobile phones are not blocked, as YouTube uses its own technology that is not simple to override. The first few search results via google.ch, which are preceded by “advert” or “advertisement”, also fail to produce results, which may have an undesirable effect.  p>

What is a Pi-hole®?

According to Wikipedia, Pi-hole is software that functions as a tracking and ad blocker as well as an optional DHCP server. Pi-hole is based on a Linux system and was developed for use on microcomputers as an embedded system. It is widely used on computers from the Raspberry Pi series. The software is integrated into an existing network as a DNS server and is therefore available to all devices in the network with DNS settings that can be configured.

Show original language (German)
Illustration image of a woman with a laptop

In addition, I would also install PiVPN (an OpenVPN server) on the same Raspi and an OpenVPN client on the smartphones.

This kills 3-4 birds with one stone:

You have a permanent, protected VPN connection to your home network, which has the following advantages:

- You always benefit from the Pi-hole filter even when you are away from home

- You can also use private landline telephony externally with the Swisscom Home app

- you can watch Swisscom TV live from abroad and not just replay/recordings

- You have access to your home network and its participants at any time

Uncle Google knows how to easily set up PiVPN

Show original language (German)

….keep on rockin'

And I personally recommend using additional programs (optionally; of course also on another Pi):

  • Plex Media Server
    • Watch your own films and series from your own server; App already pre-installed on Swisscom TV
    • The perfect Netflix alternative for these; who have digitized their DVD library or VHS cassettes and want to watch them on smartphones
  • OwnCloud / Nextcloud
    • Data storage for those who see MyCloud, Google Drive and Co as the enemy.
    • Storage of your own data as well as collaboration with colleagues and others possible.
    • Can also be used as a Samba share in your own network.
Show original language (German)

Kærar kveðjur - herzliche Grüsse
Dominik

a month later

A third Raspi has arrived. This time a Raspberry Pi 4 with 8GB RAM and an additional SSD hard drive. I installed NextCloud on it (I became aware of it through @DomiP, thanks at this point 👍)

The installation was still child’s play, but configuring web access without VPN, but with DDNS and an SSL certificate from lets encrypt, took a few hours (especially working out “how to” 😉).

Now the electronic provision of various documents and files for the club should be as convenient as with mydrive and co., simply with its own “in-house” platform. Let’s see how long-lasting and reliable it works.

Show original language (German)

@kaetho welcome to the Nextcloud squad 🤣. In fact, the setup is very tricky and the configuration of SSL is also very complicated to set up using standard means. The easiest way is usually to use distributions that have already been configured, but the visibility is relatively poor. 😉

Show original language (German)

Kærar kveðjur - herzliche Grüsse
Dominik

7 days later

@MiriamF @kaetho Thank you for the extremely helpful instructions! I received my Raspi 3+ kit this morning (a Raspi 4 is very “overkill” for a simple Pi-hole) and in the afternoon my Pi-hole was already integrated into the private network.

I’m leaving out the Swisscom Internet box and the TV-Box - I don’t want to overload my Pi-hole with Netflix DNS queries 😉

raspi.PNG

Show original language (German)

Yes, cool. I did it too.

It’s working so far and I’m already on my third Raspi.

A housing that fits ( with a little filing) I also found it.

PoE is a great thing, although Swisscom itself doesn’t really offer it or anywhere.

IMO with the Raspy PoE hat it’s a bit loud. Almost has the same noise level as my NAS.

Show original language (German)

#user63

I’m also on my 3rd Raspi, a 4th is being considered. Unfortunately I couldn’t find a suitable housing, so I’m making one myself 😉

raspi-kaetho.jpg

All with PoE, nicely stored in a rack in the basement, then the volume no longer plays a role.

Show original language (German)
4 months later

I installed the PI-Hole on a Synology NAS, works perfectly.

If you have a Synology NAS and can install Docker, you should take a look at the video here.

Super simply explained.

Show original language (German)
3 months later

Thank you for the great instructions!!!

But unfortunately this didn’t quite work for me. I installed Pi-hole on my Raspberry Pi 4 as per the instructions. I can also access the dashboard via IP address (i.e. in the browser). Then I see that nothing is happening. For example, chip advertisements are still displayed on my devices. However, I changed the DNS server on the router to the IP address of the Raspberry Pi, but this still didn’t work. I have also already tried changing the DNS server on my Windows device only. This was successful with IPv4 & IPv6 because this is displayed correctly in the CMD with the command “ipconfig /all”, i.e. the IP address of the Raspberry Pi for the DNS server.

Does anyone know what I did wrong or what I forgot to do?

Thank you very much and best regards

Show original language (German)

Hi @Friveupa20

how did you configure IPv6 on the IB3 and in piHole? When I set it up, IPv6 was disabled on the IB3.

It is now activated on the IB3. In piHole it currently looks like this:

29.09kaetho1.jpg

IPv6 is not activated at all. This is how it currently works for me.

But I have to honestly admit that I haven’t given much thought to IPv6 yet. So far this is how it works in my home network. If anyone has concrete input on how to configure piHole and IPv6 better/more correctly, please post here 😉

Show original language (German)
4 months later

Hi everyone,

I have now connected my (old) Pi to the Internetbox 3 and everything works, with one exception: only 2 clients are displayed in the Pihole, namely localhost and internetbox.home, although all network clients of course go via the Pihole.

Does anyone have an idea what else I need to set so that all device names / hostnames are “reported” to the Pi?

@POGO 1104: very good tip with the VPN, I actually wanted to use the VPN function of the Internet box there.

Show original language (German)

@schafholt every device in your network connects to the Internet via the IB. This means that the DNS requests also run via the Internet box. You can do this in your iPhone’s DNS settings (here) or in the DNS settings of an Android (here) and on Mac ([here](https://www.hellotech.com/guide/for/how-to-change-dns-server-windows-mac#:~:text=Windows%2010%20Computer- ,To%20change%20your%20DNS%20server%20on%20a%20Windows%2010%20computer,the%20following%20DNS%20server%20address.)) or under Windows ([here](https://www.hellotech.com/guide/for/how-to-change-dns-server-windows-mac#:~:text=Windows%2010%20Computer -,To%20change%20your%20DNS%20server%20on%20a%20Windows%2010%20computer,the%20following%20DNS%20server%20address.) ) adjust the DNS settings and enter your PiHole there.

Show original language (German)

Kærar kveðjur - herzliche Grüsse
Dominik

@DomiP That’s right, you could do that, but I don’t want to. In my Fritzbox, all devices were connected identically and the hostnames were “passed through” to the PiHole.

I played around with conditional forwarding in PiHole, but that didn’t solve it either 😞

Conditional forwarding

If not configured as your DHCP server, Pi-hole typically won’t be able to determine the names of devices on your local network. As a result, tables such as Top Clients will only show IP addresses.

One solution for this is to configure Pi-hole to forward these requests to your DHCP server (most likely your router), but only for devices on your home network. To configure this we will need to know the IP address of your DHCP server and which addresses belong to your local network. Exemplary input is given below as placeholder in the text boxes (if empty).

And here is the solution

I don’t have the option “Require DNS server via DHCP option 6” in the network settings / DHCP of the InternetBox 3. Enabled. After restarting the client / re-registering to the network, the host name is still passed through.

I also keep the above-mentioned PiHole settings for conditional forwarding.

Thanks to all!

Show original language (German)
5 months later

I also installed a PI-Hole and got a blocked rate of 8.3%. I saw in YT instructions that they had to activate Unique Local Addresses (ULA) on the Fritz boxes so that they could get to 30%. Does this also work with the IB4?

Show original language (German)
5 months later

Since my Raspi is still not available, I built a virtual Raspi (just for fun) in the VMWARE player, the ISO file can be found here:

Raspberry Pi Desktop for PC and Mac – Raspberry Pi

I installed Pi-hole on it following these instructions:

Block ads on every device in your house with a Raspberry Pi and Pi-hole - Raspberry Pi

And yes, all of this only took about 2 hours (it was my first contact with Raspi OS) and it worked the first time:

pihole.jpg

Even for owners of a Raspi, the VMWARE version of the Raspi should be very interesting if you want to develop and test something “outside” the Raspi.

Show original language (German)