Hacker Public Radio

HPR4061: Setup a Pi-hole


Listen Later

Kevie, a co-host of TuxJam, talks about setting up a Raspberry Pi as a network wide ad and domain blocker using the Pi-hole project.
Before starting this project you will need:
A Raspberry Pi with Raspberry Pi OS installed and SSH enabled
A basic knowledge of changing the settings on your router. I can't talk you through this as every router is different. Specifically you need to know how to give a device a static IP address and set a DNS server
The ability to use SSH
Once we have SSH'd into the Pi the first thing we should do is update it:
sudo apt update && sudo apt upgrade -y
Then we need to install the Pi-hole software itself. We can do this with the command:
curl -sSL https://install.pi-hole.net | bash
This will start an installation wizard
Once this has completed, it is recommended that you set a new admin password:
pihole -a -p
Exit the Pi and go to the admin web page by entering {the_IP_of_your_Pi}/admin in your browser's address bar.
Click on Adlist on the left side and you should see 2 input boxes. The address is where we can enter our adlist, the comment box is purely optional. Go to firebog.net/ Choose one or two from each category, but make sure that these are active (the ones in green).
Add the following two addresses to Adlist if you wish to block pornographic site:
https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/pornography-hosts
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts
For a list of specific types of sites to block then visit https://blocklistproject.github.io/Lists/
If using Cloudflare, you can add another pornography filter. Click on Settings on the left and then the DNS tab at the top. In Custom 1 (IPv4) enter the value 1.1.1.3, make sure that it is ticked.
If there is a specific site that you want to block then click on Domains in the menu on the left and add the domain. If you want to block it, then click Blacklist or if Pi-hole is blocking a site that you want to access then click on Whitelist.
Before we exit we must apply these changes or they will not take effect. On the left click on tools and then Update Gravity from the drop down menu. Press the Update button (it will take a couple of minutes to complete). You must do this every time that you make a change. Any time you add a new Adlist, Domain, Whitelist or Blacklist, it will not take effect until you do this.
Go to your Router's homepage, set the DNS server to the IP address of the Pi. This means that all traffic will run through the Pi-hole. Don't forget to hit apply if necessary before exiting.
One final task: reboot your router. This will force every device to reconnect and everything will be running through the Pi-hole.
...more
View all episodesView all episodes
Download on the App Store

Hacker Public RadioBy Hacker Public Radio

  • 4.2
  • 4.2
  • 4.2
  • 4.2
  • 4.2

4.2

34 ratings


More shows like Hacker Public Radio

View all
The Changelog: Software Development, Open Source by Changelog Media

The Changelog: Software Development, Open Source

289 Listeners

Defensive Security Podcast - Malware, Hacking, Cyber Security & Infosec by Jerry Bell and Andrew Kalat

Defensive Security Podcast - Malware, Hacking, Cyber Security & Infosec

373 Listeners

LINUX Unplugged by Jupiter Broadcasting

LINUX Unplugged

268 Listeners

SANS Internet Stormcenter Daily Cyber Security Podcast (Stormcast) by Johannes B. Ullrich

SANS Internet Stormcenter Daily Cyber Security Podcast (Stormcast)

653 Listeners

Curious Cases by BBC Radio 4

Curious Cases

826 Listeners

The Strong Towns Podcast by Strong Towns

The Strong Towns Podcast

422 Listeners

Late Night Linux by The Late Night Linux Family

Late Night Linux

164 Listeners

Darknet Diaries by Jack Rhysider

Darknet Diaries

8,035 Listeners

Cybersecurity Today by Jim Love

Cybersecurity Today

181 Listeners

CISO Series Podcast by David Spark, Mike Johnson, and Andy Ellis

CISO Series Podcast

189 Listeners

TechCrunch Daily Crunch by TechCrunch

TechCrunch Daily Crunch

42 Listeners

Strict Scrutiny by Crooked Media

Strict Scrutiny

5,800 Listeners

2.5 Admins by The Late Night Linux Family

2.5 Admins

98 Listeners

Cyber Security Headlines by CISO Series

Cyber Security Headlines

139 Listeners

What the Hack? by DeleteMe

What the Hack?

221 Listeners