Introduction to Ads Free Network Pi Hole

by akhileshkiran in Circuits > Raspberry Pi

554 Views, 4 Favorites, 0 Comments

Introduction to Ads Free Network Pi Hole

Introduction.gif

Nowadays, Ads are frustrating while surfing the internet. Due to pandemic, most of these days we are more adapted to the home Wi-Fi network usage. If you want to make your home network free from the Ads, Automatic malware protection and Adult content filtering. This is the most reliable solution

Pi-hole® | Network-wide Ad Blocking & Content Filtering Application.

Pi-hole or Pi hole is a Linux network-level advertisement and Internet tracker blocking application. Which acts as a DNS sinkhole and optionally a DHCP server, intended for use on a private network. It is designed for low-power embedded devices with network capability, such as the Raspberry Pi, but supports any Linux machines.

More About Pi-Hole

Supplies

  • Raspberry PI ( For this project, I am using Raspberry PI3B)
  • PC / Laptop (Used to Configurations)
  • TFT Display (Optional)
  • Micro SD Card (16GB+)
  • HDMI Cable (Connecting PI to Monitor)
  • Monitor (Configure PI Settings)

Links :

Installation & Configuration

BJVh7NrD0C.png
msedge_M9uNaeB24W.png
6VchGhVFcz.png
  1. For this project, I'm using the Raspberry Pi OS Lite.
    Download - Raspberry Pi OS Lite

  2. Writing PI ROM to SD Card.
    Download - Raspberry Pi Imager
  3. After downloading above software. Install Pi Imager.
  4. Connect the SD card to the Computer and Burn the PI OS using Pi Imager.

PI TFT Display

raspberry_pi_pitft-trace-18-cut.jpg

PiTFT Display

  1. Cut Trace

Use a hobby knife to mark in between the two pads and make sure it is deep enough to fully break the trace.

That's pretty much all we need to do to the PiTFT display!

Connecting Raspberry Pi3B + TFT Display

PI3B.jpg
ApplicationFrameHost_N9z6wLaJ6Q.png
ApplicationFrameHost_q2DuRYnFoi.png

Connect the PI Display TFT terminals to the Raspberry PI as shown in the figure.

Raspberry Pi3B - Configuration SSH & Network

raspbian-lite-ssh-file.png

Connect the SD card to the system and Create a New File as "ssh" without any Extension as shown in this figure.

Assigning Static IP to Raspberry PI ( Router Config )

msedge_dXF48RQdcA.png

I have assigned a static IP Address to the Raspberry Pi (MAC Id) in the Router Network IP configuration.

Configure PiTFT Display With Putty

putty_uH4AEVB2ec.png
putty_kgdjLiNYT3.png
msedge_6jBnS0ljTX.png
Booting PiTFT Display

Connecting to Putty.

Follow the steps as displayed on the 1 & 2 reference Images for connecting to the Raspberry Pi Remote Shell. Proceed to the below Steps to configure the Pi-TFT Display.

Install PiTFT (fbcp) Support

This first sequence configures the system for the PiTFT display.

cd
sudo curl <a href="https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/pitft-fbcp.sh">  https://raw.githubusercontent.com/adafruit/Raspbe...> >pitft-fbcp.sh
sudo bash pitft-fbcp.sh
  1. Select the “Configure Options Manually” option, which sets up various system parameters to match this project.
  2. Answer “Yes” to the reboot question.
  3. Now finally you can able to see the Pi-TFT Display with the Linux screen booting up.

Pi-Hole - Installation

putty_3YPkxo1SIx.png

To setup Pi Hole, from the command prompt (locally or remotely through SSH using Putty) use the below commands.

wget -O basic-install.sh https://install.pi-hole.net
sudo bash basic-install.sh

or try the below command

curl -sSL https://install.pi-hole.net  | sudo bash

Pi-Hole - Installation - Welcome Screen

msedge_BE10XqPtTn.png

Pi-Hole installer prompts with the standard Debian wizard. Read through the introduction and press Enter to continue.

Pi-Hole - Donation Screen

2.png

After installing PiHole, if it's really saving your bandwidth and improving network performance. I would greatly appreciate if possible you could give a donation to help them to continue to develop, provide support and give back to the community.

Donate – Pi-hole

Pi-Hole - Static IP (Caution)

3.png

It is recommended to assign a static IP address to the PI before continuing to the next step. The router is configured as a DHCP server, It will be assigning the IP address to the devices which are connected to the router.

Note : You might face some issue when there is a Router Reboot and Pi is configured through the DHCP dynamically. It will auto assign the IP address to the Raspberry Pi. Pi-Hole host may not work properly.

Pi-Hole - Interface Setup

4.png

For the performance of the Pi-Hole, I am going to use wired connection Ethernet (eth0) interface.

Pi-Hole - DNS Provider Selection

5.png

I am selecting the Up Stream DNS Provider as the Cloudflare because comparing to the other DNS Providers it has the lot of good uses for the

DNS query data.

It collects limited DNS query data that is sent to our 1.1.1.1 resolver. Cloudflare 1.1.1.1 resolver service does not log personal information, and the bulk of the limited non-personally identifiable query data is only stored for 25 hours. -- Introducing 1.1.1.1 for Families

Pi-Hole - 3rd Party Blocklist Activation

6.png

Leave the current selection to default as shown in the screenshot which will allow Pi-Hole to block the Ads related domains by using the 3rd Party Services Block list.

Pi-Hole - IPv4 & IPv6 Selection

7.png

I suggest leaving the defaults enabled as shown in the screenshot and continuing with Pi-Hole installation.

Pi-Hole - IP Address & Gateway Configuration

8.png

As we have already configured the Static IP address for the Raspberry Pi. I suggest you to recheck the Local assigned IP address in the router and continue with the Pi-Hole installation.

Pi-Hole - IP Conflict (Caution)

9.png

A warning message is displayed to recheck on the Static IP address assignment.

Pi-Hole - Web Admin Interface Installation

10.png

I recommend selecting ON to install the Web Admin Interface. Which is very useful in Monitoring and Customizing the Pi-Hole.

Pi-Hole - Web Server Installation

11.png

I recommend selecting ON to install the Web Server Interface. Which is very useful in Logging Queries, Maintains the Log Information and settings.

Pi-Hole - Log Queries Setup

12.png

I recommend selecting ON to Enable the Log Queries which maintains the history of the web queries and useful in monitoring the web trafficking.

Pi-Hole - Installation Successful

13.png

After successfully installing the Pi-Hole, The URL for the Web interface and the credentials will be displayed on the screen.

Note : Before clicking ok, I request you to note down the credentials of the web admin interface.

Forgot Pi Hole Password ?

Login to the Raspberry Pi using SSH into your Pi Hole server and use the command

pihole -a -p  

to reset Pi Hole web interface password.

Logging Into the Web Interface

Login.gif
msedge_z0oNW0WW6z.png

There are three ways to get to the admin dashboard from your Web browser:

  1. http://IP_ADDRESS_OF_YOUR_PI_HOLE/admin/
  2. http:/pi.hole/admin
  3. http://pi.hole/

Updating the Upstream Domains

CiIL4KQDFT.gif

I am using the additional benefits from the Cloudflare to block the Malware and Adult Content.

1.1.1.1 for Families is easy to set up and install, requiring just changing two numbers in the settings of your home devices or network router: your primary DNS and your secondary DNS. Setting up 1.1.1.1 for Families usually takes less than a minute and we've provided instructions for common devices and routers through the installation guide.

1.1.1.1 for Families has two default options: one that blocks malware and the other that blocks malware and adult content.

You choose which setting you want depending on which IP address you configure.

Malware Blocking Only
Primary DNS: 1.1.1.2
Secondary DNS: 1.0.0.2

Malware and Adult Content
Primary DNS: 1.1.1.3
Secondary DNS: 1.0.0.3

For IPv6 use: Malware Blocking Only
Primary DNS: 2606:4700:4700::1112
Secondary DNS: 2606:4700:4700::1002

Malware and Adult Content
Primary DNS: 2606:4700:4700::1113
Secondary DNS: 2606:4700:4700::1003

Pi-Hole on Pi-TFT Display

Booting Pi-Hole on Raspberry Pi 3 with Adafruit PiTFT - 2.8&quot; Display

Booting Pi-Hole on Raspberry Pi 3 with Adafruit PiTFT - 2.8" Display