Are you getting tired of all those annoying ads when you are playing a game on your phone? Or are you done with ads popping up on your laptop? Then this article is for you. In this article, we are going to explain how to set up Pi-hole, a systems that blocks ads.
What is Pi-hole
In short, Pi-hole acts as a DNS server. Normally, your DNS server is Google, CloudFlare, OpenDNS or just your ISP. These work, but they won’t block ads for you. Most of them are even very slow.
Pi-hole is local and therefore superfast.
How does Pi-hole work
The first time you go to any website. Your device, your computer for example, sends a request to the DNS server to get the IP of that website. The next time, it does this again (depending on your configuration). This could easily take 100ms, depending on the DNS server, slowing down your internet experience.
When you use Pi-hole, Pi-hole remembers those IPs per domain and does not request it every time. Your computer just request the IP of the website from Pi-hole. Pi-hole then responds with the IP 0.0.0.0 if it’s an ad (within 1ms), the correct IP (within 100ms if it’s not an ad and the website is not visited before) or with the correct IP (within 1ms if the website has been visited before).
This increases the speed of your network drastically and it blocks ads.
How to install Pi-hole
- Raspbian: Jessie / Stretch
- Ubuntu: 16.04 / 16.10
- Fedora: 27 / 28
- Debian: 8 / 9
- CentOS: 7 (not ARM)
To install Pi-hole, just execute the following command:
curl -sSL https://install.pi-hole.net | bash
This will do everything that is needed to install Pi-hole on that machine.
It is also possible to use Docker, click here for more information about running Pi-hole in Docker.
When the script is finished, it is important to tell the router that the machine that you installed Pi-hole on, is the new DNS server for your local network. Go to your router settings page (usually 192.168.1.1, 10.0.1.1, or something like that). Go to the LAN page (this is different for all routers) and input the IP of your Pi-hole machine as primary DNS server. It is also recommended to give your Pi-hole machine a static IP, also configure this in the router to be sure, your IP won’t change, because that would enable ads again.
If you can’t find the field to enter the IP or if you have any other question, please get in touch and we will help you the best we can.
After the installation
When you installed and configured Pi-hole, you don’t need to do anything. You could whitelist/blacklist certain domains if that is necessary for you. But you could just leave it.
After a while, your dashboard will look like this.