Installing PiHole on a Raspberry Pi from a Windows machine.

Table of Contents

Why a pihole?

PiHole is a easy slick solution for helping keep your home environment a little safer from various URLs out there. My personal implementation removes a plethora of bad URLs including spam, advertisement sites, porn, etc and attempts to keep my home more secure from bad websites. If your end users are even a little internet savey then they will find it easy to get around this but generally speaking most people won’t understand what is going on.

The PiHole is a quick install and runs on a Raspberry Pi, you configure it with various blacklist items and any DNS query for the bad URLs simply gets routed back to nothing. For example, lets say we don’t want to have any more advertisements from company ABC123.com. We log into the PiHole and blacklist ABC123.com, now any DNS queries to this URL will automatically be returned as nothing, so your device is no longer able to connect to the real website. You can do this with other DNS servers as well, I simply went with the PiHole because I wanted a fun project to do on my Raspberry Pi.

Installation.

  1. Download and install Raspbian https://www.raspberrypi.org/downloads/raspbian/
  2. Install Raspian on the MicroSD Card, for Windows follow: https://www.raspberrypi.org/documentation/installation/installing-images/windows.md
  3. Log into the Raspian, hardset IP address, configure basic settings
    • machine name
    • time zone
    • country
    • wireless country
  4. Update Pi: sudo apt-get update & apt-get upgrade
  5. Install PiHole: sudo curl -sSL https://install.pi-hole.net bash
    • Answer any on-screen items, at the end the password is included for web interface.
    • [i] Web Interface password: #######
    • This can be changed using ‘pihole -a -p’
  6. Add block lists:
    • https://raw.githubusercontent.com/quidsup/notrack/master/trackers.txt
    • NOTE: Only use b) if you want extra hard rules setup.
  7. Update router or current DHCP server to utilize IP address in #3.