Skip to content

Instantly share code, notes, and snippets.

@mscribellito
Last active March 25, 2022 15:16
Show Gist options
  • Save mscribellito/99c4ccb2f1667d8ec680741d0e19ea60 to your computer and use it in GitHub Desktop.
Save mscribellito/99c4ccb2f1667d8ec680741d0e19ea60 to your computer and use it in GitHub Desktop.
Pi-hole

Setup Pi-hole on Your Raspberry Pi

Update your Raspberry Pi

Update package list and packages:

sudo apt update
sudo apt full-upgrade -y
sudo reboot

Cleanup packages and cache:

sudo apt autoremove
sudo apt clean

Enable SSH and RDP

Enable SSH at Preferences > Raspberry Pi Configuration > Interfaces. Check Enable for SSH.

SSH can also be enabled via:

sudo raspi-config

(Optional) Install xrdp if you want the ability to RDP:

sudo apt update
sudo apt install xrdp -y

Assign Static IP

Pi-hole needs a static IP to function. The easiest method to configure this is creating a DHCP reservation on your router using the Pi's MAC address.

Automated Pi-hole Install

curl -sSL https://install.pi-hole.net | bash
  • Follow the prompts to navigate through the installation process.
  • Ensure you save the admin password somewhere safe.

https://github.com/pi-hole/pi-hole/#one-step-automated-install

Configure Router DNS

Configure your router's DNS to point to the Pi's IP address.

You can now login to the admin console at http://pi.hole/admin/index.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment