Advertising on the internet is probably the reason why there are so many free offers. Music, videos, instructions, tutorials. There is a legal free source online for (almost) every type of content. These offers are often ad-financed. Generally a good compromise for „customers“ and providers. Unfortunately, there are also many platforms whose advertising goes far beyond the usual banners. Annoying autoplay videos, pop-ups across the entire screen, unwanted redirects. This is where an ad blocker can help. As a browser plugin for desktop PCs, there have been very good blockers for a long time that can filter really effectively. Unfortunately, they only filter content on the PC on which the plugin is installed. Smartphones, many tablets or even the FireTV stick on the TV are left empty-handed and continue to show the (sometimes) unwanted advertising content. This is where Pi-hole comes to the rescue.
Pi-hole acts as a central ad blocker for the entire home (or company) network. The solution is able to filter all network traffic that passes through the network. Regardless of whether a PC, notebook or smartphone is used as the end device.
How it worksPi-hole acts as a DNS server. Normally, the software runs on a Linux PC, Raspberry Pi or as a Docker container. If configured correctly, your router will route all DNS queries via the Pi-hole server and filter out (configurable!) unwanted elements.
In order to avoid unnecessary electricity costs, we recommend installing it on a compact, low-power computer such as the Raspberry Pi. The current version 4 in particular is ideal for this thanks to the significant leap in performance compared to the previous generation. However, it is also possible to make an existing NAS Pi-hole-capable using Docker.
Prerequisites (Raspberry version)
- Raspberry Pi* (ideally version 4B)
- Micro SD memory card*
- Power supply for Raspberry Pi*
- Optional: Case*
- Raspbian OS
In total, components worth approx. 70€ are required. However, the Raspberry offers enough performance reserves to be used for other projects. An existing predecessor model can also be used without further ado, thus significantly reducing the necessary investment.
Installing the softwareFirst, of course, your server must be installed with Linux, if not already done. For the Raspberry, there are now tools for Linux, Windows and Mac available directly on the manufacturer’s website to write the finished operating system to the SD card.
Now connect to your server via SSH. As a Windows user, you will also need an SSH client, depending on the version you are using.
Start the installation with the following command:
curl -sSL https://install.pi-hole.net | bash
Confirm the installation with your Sudo password. As soon as the installer shows a blue „image“, you have to make or confirm some settings. Most of the settings are already correctly preselected and you can confirm them directly with Enter.

The wizard also asks whether the IP address of the server should be static. In general, this option is feasible, but to avoid address conflicts within the network, I recommend selecting No here and storing the server’s address permanently via the DHCP server (in most cases the router).


Now Pi-hole asks for the privacy level of the logs. For private users, the selection is rather irrelevant, but if Pi-hole is used in a business environment, it must be consulted in any case, as network traffic may not be logged just like that.

Now the installation is complete. The wizard now outputs the login data that you will need later to log in to the Pi-hole web interface.

Configuration of the DNS server
In order for Pi-hole to also be used as a DNS server and thus block advertising, this must be configured in the clients or in the router. Although client-side configuration is possible, it must then be carried out on each end device. The solution via the router is therefore recommended.
First, the server should be assigned a fixed IP in the router’s DHCP server. With Fritzboxes, you can find the option under Home network / Network.

Using the pencil icon next to the corresponding device, you can access the menu to check the box for a permanent IP address.

You can then enter the IP address of the Pi-hole server under Internet / Access data / DNS server.

After clicking on Apply, the Pi-hole is active and filters the advertising. Depending on the DNS caching settings, it may take some time before known websites are also filtered. To test this, you can reopen this page in a private window (Ctrl + Shift + N). The ad below this paragraph should then not be visible.
You can now configure as you wish via the Pi-hole web interface. Exclude certain pages from filtering, block specific content, release individual clients. In general, there are many options available here that you can explore as required.
