Pi-Hole with Unbound - Full Setup Guide by ᏤⵁŁTRⵁИł€

This guide will walk you through setting up a Pi-hole with Unbound, gaining you network-wide ad and malware domain filtering, as well as your own local recursive DNS server.

These instructions assume you have a functional LAN setup, access to a desktop or laptop with internet access, as well as basic networking and command-line experience.

  1. ASSEMBLE PARTS
  1. DOWNLOAD RASPBERRY PI OS "LITE" IMAGE
  1. WRITE IMAGE TO MICROSD CARD
  1. ENABLE SSH
  1. DISABLE BLUETOOTH AND WIFI
  1. CONNECT AND BOOT THE PI
  1. FIND THE IP ADDRESS OF YOUR PI AND RESERVE IT
  1. SSH INTO PI-HOLE
  1. CHANGE HOST NAME

    $ sudo nano /etc/hostname

    • Change the name to something else, such as pi-hole
    • Write out and exit

    $ sudo nano /etc/hosts

    • Change the last entry after 127.0.1.1 to the same thing you entered into /etc/hostname
    • Write out and exit

      (Keep in mind that this will only change the hostname; not the username you log in with (pi).)

  2. CHANGE PASSWORD

    $ passwd

    • Follow prompts
  1. INSTALL PI-HOLE
  1. CHANGE WEB ADMIN PASSWORD

    $ pihole -a -p

    • Follow prompts

    (This will only change the password for the web admin console; not the password to login via the terminal.)

  2. INSTALL UNBOUND:
  1. TEST UNBOUND DNS RESOLUTION

    $ dig pi-hole.net @127.0.0.1 -p 5335

    • We are asking dig to use the localhost for DNS lookup

    $ dig sigfail.verteiltesysteme.net @127.0.0.1 -p 5335

    • This should return a SIGFAIL error

    $ dig sigok.verteiltesysteme.net @127.0.0.1 -p 5335

  2. SET PI-HOLE TO USE UNBOUND AS DNS RESOLVER
  1. SET PI-HOLE AS YOUR LOCAL DNS SERVER
  1. TESTING
  1. ADD ADDITIONAL BLOCKLISTS AND WHITELISTS (optional)
  1. VIEW STATS
  1. UPDATE