Block ads with Pi-hole

Block ads with Pi-hole

Block ads with Pi-hole

It has been a wonder to find Pi-hole - a black hole for Internet advertisements.

Relatively easy to spin it up, I have been able to do so on my Raspberry Pi 3 B in Raspbian

dashboard212

What you get is basically a personal multi-functional DNS-level Ad blocker.
I hooked my Raspberry Pi 3 up to my wireless router which is connected to my providers modem in bridging mode and have set WAN DNS to Raspberry Pi's internal IP address.

After that, whenever a client connects to my WiFi it automatically gets all Ads blocked at the network level.

The Pi-hole could be used whenever I am out of my wireless signal range, by simply running the OpenVPN server on my router. Connecting to an untrusted WiFi Hotspot is not dangerous anymore since OpenVPN encrypts all my network traffic between me and the server. And as a benefit, blocking the Ads at the network level would reduce the mobile data usage and the CPU load. The latter is valid, of course, as long as you are not running the Pi-hole directly on your smartphone.

If you are interested in more details, feel free to drop me a comment or email me.

Visit Pi-hole website for more details.

Since I liked the Pi-hole project very much, I started donating $5 to them, monthly.

There are couple of things that it cannot block:

  • youtube ads since they use the same domain as for streaming the video;
  • ads which are distributed via CDN;