I am sure this project will be repetition of the concept. But I am creating so that we have more sources of creating this awesome tool
Setting up Raspberry PiDownloadOS
A raspberry pi needs an operating system to start with. In order to install this, you need to download the latest version from Raspbian Lite. Unzip the downloaded file.
InstallOS
Once the OS file is downloaded, download Balenaetcher and install. After installation, open the app and click on Select Image. At this stage, make sure you have inserted Micro SD card to your laptop. Select the unzipped OS file (.img extension) and then click on Flash. Process will start and it will burn the OS image on SD card. Once done, remove the SD card and insert again to your laptop. Goto File Explorer and select boot drive of SD card. Inside, create a new text file and name it ssh without any extension (from File Explorer properties enable option to show file extensions) by deleting extension as well. Once this is done, copy wpa_supplicant.conf file from Attachments section. Before copying file, open it in Notepad++ and update SSID and Password with your wifi credentials and save it.
ssid=""
psk=""
Remove SD card and insert in Raspberry Pi. Connect power and let it boot. Then open Advance IP scanner and scan for IPs in range of 192.168.100.1-192.168.100.255 (change the range based on actual IP assignment by your router). You will see Raspberry Pi IP. Now open Putty and in Hostname put the IP you received and click on Open. This will open a command prompt asking to put username. Type pi and then for password raspberry. This will log you in to Raspberry Pi.
PiHole Setup
Run below commands one by one in the prompt after log in and select Y/Yes for any prompt:
sudo apt-get update
sudo apt-get upgrade
Then run below command:
curl -sSL https://install.pi-hole.net | bash
This will take around 20min. After this, there will be series of prompts. Do below in the same sequence for these prompts:
- Pick who will be the upstream DNS (for non-ad blocked sites) - Google is fine and will probably be up all the time
- Select IPv4
- Click Yes
- Click Ok (Make sure in the prompt On is selected for web admin interface)
This will start configuring the PiHole. Once done, it will display you your PiHole IP and admin password. Note it somewhere or take screenshot and save on your computer. Thats all
Using PiHole
On your computer, open browser and put http://pi-hole.local/admin/ in the address bar. This will open PiHole statistics interface. If the link does not open then repalce pi-hole.lcoal with IP of your Raspberry Pi.
Next we need to configure our devices to start communicating with PiHole. For this we need to change network settings of all devices that need to be connected. Goto Network Settings of your device and under the DNS settings, add Raspberry Pi IP as Preferable DNS server.
Do the same on all devices including mobiles and tablets. After this. all devices will start communicating with PiHole. In the web interface, you will see number of clients in Total Queries.
With default settings, you can block many of the traffic coming to your devices. For further assistance, you can join PiHole facebook group
Comments
Please log in or sign up to comment.