Setup your Pi-hole

Thomas Bnt ☕ - Aug 14 '18 - - Dev Community

Table Of Contents


Introduction

This post shows how to install Pi-hole on a raspberry Pi 3 B.

Pi-hole is used to block unwanted queries and URLs that you do not want to load on the network. it protects you from trackers and optimizes the traffic of your network.

Raspbian installation and update/upgrade packages

First, flash your disk SD from Etcher or other app.

Etcher

Here is Raspbian Stretch 2017-09-07 Lite
Wait minutes.. and is complete !

Etcher complete

Connect your setup for update and install new packages.

sudo apt update -y && sudo apt upgrade -y
Enter fullscreen mode Exit fullscreen mode

Wait good minutes .. during this time drink a good cappuccino.

Install curl :

sudo apt install curl
Enter fullscreen mode Exit fullscreen mode

Install Pi-hole

You can clone from the repo of Pi-hole or directly curl with this command :

curl -sSL https://install.pi-hole.net | bash
Enter fullscreen mode Exit fullscreen mode

When ask you if you want install on your raspberry and put in static IP, check yes.

Pi-hole need Static IP
Then choose your preferred DNS. You can then change it and put several.

Choice your prefered DNS

You can select blocklists ads :

List of Block ads per default

It will also ask you if you want a web panel, I strongly recommend you to leave validated so that you can from anywhere in the local network connect to the raspberry with a password and manage your DNS/blacklist and have your statistics.

Web panel and end

As soon as you finish installing Pi-hole, it will give you the localhost address and the password generated.

For edit the password :

sudo pihole -a -p 
Enter fullscreen mode Exit fullscreen mode

This is a preview of the panel when you are connected 🎉
The dark theme is edited by me, you can found at this repository.

Preview

Links

Repository of Pi-hole


Check my Twitter account. You can see many projects and updates. You can also support me on Buy Me a Coffee, Stripe or GitHub Sponsors. Thanks for read my post ! 🤩
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .