These instructions are from my old blog A Pentester’s Journey, I have left the content mainly original. One of the biggest goals I have for this website it showing my growth, so by posting my older content here as well as creating new content I hope to show the you all the growth Ive made in not only creating these projects but my ability to document them in a reader friendly way.
Supplies
What you’ll need for this walk through:
- Raspberry Pi (anything from the Raspberry Pi Zero and Up, This Walk-through uses a Raspberry PI 3B+)
- Network connection (Either Wireless, or wired)
- Ethernet cable (if using wired connection)
- HDMI Cable
- HDMI compatible monitor
- Input devices (mouse, keyboard)
- A micro SD card (minimum of 2gbs, plus adapter if your pc doesn’t have a micro sd card slot)
- A Computer to run the image software.
Initial Set Up of Your Raspberry Pi
First you need to image Raspberry OS onto a raspberry Pi as the set up is a lot more familiar to the everyday user, with a desktop environment
(You can use this walk-through to create a PI hole on a Raspberry Pi running in headless mode (no monitor) as all the Pi Hole initial install and setup is through the terminal anyway, just set up the raspberry pi in headless mode, it is noted in the walk-through were you can pick back up, and use the commands from this walk-through, or you can just click HERE)
- To create a raspberry pi OS image first plug in your SD card to your computer
- You will need to install the Raspberry PI OS installer
(you can get it from the following website: https://www.raspberrypi.com/software/) - Open the Raspberry Pi Imager
- Next Click choose OS, an Operating System menu will appear, choose Raspberry Pi OS (32-bit)
- Next click “CHOOSE STORAGE” and click on your SD drive
- Next Click “WRITE” and wait for the write to finish
After your SD has finished, take it out of your computer and then plug it into your raspberry pi, Connect all peripheral devices (ie., mouse, keyboard, monitor, Ethernet cable) and turn you PI on.
- Upon first boot you will be greeted with this message:
Click “Next” - Set your Country, Language, and Timezone, then click on Next again.
- Enter a new username and password for your Raspberry Pi and click on Next.
- Set up your screen so that the Desktop completely fills your monitor.
- Connect to your wireless network by selecting its name, entering the passwork, and clicking on Next.
- Click on Next, and let the wizard check for updates to Raspberry Pi OS and install them (this might take a few mins)
- Click on Restart to finish the setup.
Installing Pi Hole
This is where anyone who setup their Pi in headless mode should start following again.
If your raspberry Pi is running in desktop mode you will first need to open the terminal, if you are running in headless mode you can start entering in commands right away.
- First we are going to make sure or raspberry PI OS is fully updated with the following command:
Sudo apt-get update && sudo apt-get upgrade - Next we will install PI-Hole on to our device with the following command:
Curl -sSl https://install.pi-hole.net | bash - After the two above commands have been executed Pi Hole should be installed on your device and you should be greeted by the Pi-hole automated installer
Having done all of this you will now be able to access the Web Interface of your Raspberry Pi Pi-Hole System as you can see occurring in the last three frames of the above image. From any locally connected device you will be able to access this Web Interface. Just type in the provided IP Address followed by | /admin | into the URL of any internet browser. In my case I typed | http://192.168.1.188/admin |. It will then request the Pi-Hole Password to access the Web Interface. If you want to change your unique default Pi-Hole password type and enter into a new Terminal window the following | pihole -a -p |. It will then prompt for a new password, if none is provided the password required to access the Web Interface will be removed.
If you want to make big changes remotely, turning on SSH in the Raspberry Pi Configuration at this point would be a great idea. If you are going to install your Pi-Hole in a place that is hard to access/not near a monitor then doing this is a necessity.