Anjan Nair
Anjan's Blog

Anjan's Blog

Pi-hole with Raspberry Pi 3

Pi-hole with Raspberry Pi 3

Setup a Raspberry Pi 3 to be a Pi-hole server for your network and block ads and trackers.

Anjan Nair's photo
Anjan Nair
·Aug 10, 2022·

2 min read

Subscribe to my newsletter and never miss my upcoming articles

Play this article

Table of contents

  • Installing Pi-hole
  • Ad-lists
  • DNS over HTTPS (DOH)

A pi-hole is basically a black-hole for internet ads. The project is an open source ad blocking software at the DNS level.

Installing Pi-hole

The easiest way of installing Pi-hole is by running the following script

curl -sSL https://install.pi-hole.net | bash

The script will do everything to install the software and convert your Raspberry Pi into a pi-hole.

Once done, you can open the web interface of the pi-hole. The web interface is simple to understand and easy to setup too.

Finally before moving on we set the DNS of our router to the IP address of our pi-hole.

Ad-lists

To add lists apart from the one used at setup we go to Group Management>Adlists

My preferred lists are -

1) Normal Hosts - v.firebog.net/hosts/static/w3kbl.txt

2) Adguard List - v.firebog.net/hosts/AdguardDNS.txt

3) EasyList - v.firebog.net/hosts/Easylist.txt

4) Privacy - v.firebog.net/hosts/Easyprivacy.txt

5) Windows Spyware - raw.githubusercontent.com/crazy-max/Windows..

6) Anti-Malware List - raw.githubusercontent.com/DandelionSprout/a..

7) Threat Intel by OSINT - osint.digitalside.it/Threat-Intel/lists/lat..

8) Adult sites - blocklistproject.github.io/Lists/porn.txt

You can add all this together by adding the URLs separated by space. After doing so make sure to update the Gravity list by running pihole -g command or by heading to Tools and Update Gravity. This downloads the list and updates it.

DNS over HTTPS (DOH)

To setup DNS over HTTPS on your pi-hole we use the docs given in the official website here.

Note - Go with the manual method as the automatic did not work for me.

 
Share this