Edvinas Urbasius


Front-end developer. Interested in IT, history and economics. The life-long learner.


Blocking ads on a network level with Pi-hole

Last week I started experimenting with Raspberry Pi. It’s a credit card size computer from the UK that is able to run various operating systems. With Raspberry PI you can build awesome things.

I started with a need for my own cloud system (NextCloud) but failed badly due to network port problems. I know how to work with computer networking, but my ISP is blocking the ports by default, so I postponed a project and chose to install a Pi-hole instead.

Pi-hole is a network-level advertisement blocking system. It's like a black-hole that sucks out all of the ads literally. I was surprised by its speed and efficiency when I tried it for the first time.

Pi-hole installation is no hassle. It comes as a pre-made image that you burn into your microSD card and runs on a Raspberry Pi. The post-installation configuration menu is quite easy to understand and you have a working system in no time. After that, you see a very nice admin panel that helps to administer Pi-hole.

The trick to make Pi-hole to work is to point it as your DNS server on your router. You access its admin panel and find DNS section and change the IP addresses to Pi-hole IP address. After that, you restart the computer and from now own you have a system that deals with ads efficiently.

You can even extend Pi-hole by making it your primary DHCP server or building VPN server capability that helps you to reach Pi-hole remotely, thus enabling ad blocking in your phone or tablet.

I haven't tried this one, because it will require some time to set up the functionality, so, for now, ad blocking will be enough for my house.

And the last great thing about this project is its documentation. It's easy to digest and understand, so you will be running your Pi-hole instance in no time. I highly recommend to try it. It's a nice thing to have!

You'll only receive email when Edvinas Urbasius publishes a new post

More from Edvinas Urbasius: