Abertay Ethical Hacking Society
  • Home
  • Information
    • Constitution
    • Change Logs
      • Website
      • Discord
      • Github
      • Server
    • Meetings
      • 2021-2022
    • Honourary Members
  • Contributing
    • Contributions
      • Using Git
      • Formatting and Best Practise
  • Society Events
    • Securi-Tay
      • History
  • Help Guides
    • Programming / Scripting
      • AWK
      • Bash Scripting
      • C Coding
      • Java Coding
      • LaTeX
      • Markdown
      • Project Ideas
      • Python Scripting
      • Tools
    • Software
      • Operating Systems
        • Installing Arch
        • Installing Kali
        • Linux Commands for Beginners
        • MacOS
      • Tools
        • PGP
          • A guide to using PGP on Android
          • A guide to using PGP on macOS
          • PGP
        • Radare2
        • Nmap
        • Regular Expressions
        • The Browser Exploitation Framework (BeEF)
        • Vim
        • Vimium
        • Zsh
    • Networking
      • Domain Name System (DNS)
      • Remote access to your Abertay network drive
      • Secure Shell (SSH)
      • TLS 1.3
      • Wireshark
      • Subnetting
    • Techniques
      • A guide to creating malicious macro-enabled Excel worksheets
      • Open Source Intelligence (OSINT)
      • Google-Fu
    • Jobs
      • Common Interview Questions
    • Home Lab
      • PiHole
  • Glossary
    • Infosec Terms
    • Computing Terms
    • Hardware Terms
    • General Terms
    • Development Terms
    • Networking Terms
  • Members
    • Profiles
      • AG
      • Isaac
      • Sam
  • Other
    • Other
      • Data Dumps
      • Meetups
      • Meltdown & Spectre
      • Movies
      • Project topic suggestions
      • Recommended Reading
Powered by GitBook
On this page
  • Install Guide
  • Requirements
  • Initial things
  • Configuring the Raspberry Pi
  • Installing & Testing
  • Misc
  • Deploying on Devices

Was this helpful?

  1. Help Guides
  2. Home Lab

PiHole

How to set up a PiHole

PreviousHome LabNextInfosec Terms

Last updated 3 years ago

Was this helpful?

An install guide by Kyle

Using a Raspberry Pi as the networks DNS server, “blocks ads for all your devices without the need to install client-side software. The Pi-hole blocks ads at the DNS-level, so all your devices are protected.” This also allows ad blocking on devices which do not support it (think mobile/tablet)

Install Guide

This guide has been tested using Raspbian Jessie, macOS Sierra 10.12.3 & PiFiller 1.3 and works.

Requirements

  • MicroSD card (min 4GB)

  • MicroSD card reader to USB depending on your computer

  • A way to burn images onto SD card - I choose

  • Raspberry Pi with a power cable, monitor (just for install set up, can be run headless later), keyboard for initial input, - Ethernet cable to connect the RPi to the router, Wi-Fi adapter for RPi

  • Access to administration panel on the router (this information is typically next to the SSID on the bottom of the router)

Initial things

  1. Download latest

  2. Burn this image to the SD card using . You can optionally use dd or another method to burn it. PiFiller is the fastest and easiest way I have found to do it.

  3. Attach Raspberry Pi to monitor & keyboard, connect via Ethernet to the router and insert the SD

  4. Then power on. If its done in a different order it can fall over.

Configuring the Raspberry Pi

  1. Check you are connected to the internet (ping 8.8.8.8 is easy way to check, this is Google’s DNS server so if thats down today will be a bad day)

  2. Update the Pi using sudo apt-get update -y

  3. Optional: install a different text editor, nano is installed by default. sudo apt-get install vim -y

  4. Configure a static IP address to allow headless use of the Pi

  5. run route -ne and note the default gateway IP address (routers IP address)

  6. Now we need to edit the dhcpcd.conf file using sudo vim /etc/dhcpcd.conf

  7. The following information needs to be added to the bottom of the file:

  8. interface eth0 (interface ethernet)
    static ip_address=192.168.0.88       # the ip to give the Pi
    static routers=192.168.0.1           # the gateway/routers IP
  9. sudo reboot will allow all changes to take effect

  10. To check it has worked run ifconfig and eth0 should be assigned 192.168.0.88 (or whatever you chose)

  11. Enabling SSH: this is on by default on the Raspberry Pi - if it is not working run sudo raspi-config and enable it in the advanced > ssh menu.

  12. Optional: create a bash alias in .bash_profile to allow easy entry. I added alias pihole='ssh pi@192.168.0.88' so logging into PiHole is as easy as just typing it into terminal.

Installing & Testing

  • The install covers it all, its very easy to do, remember and note the admin password produced.

Misc

The default credentials for the Raspberry Pi is username: pi & password: raspberry

Deploying on Devices

You cannot edit the DNS servers on the Virgin HomeHub and after searching around it also seems to be the same for Sky, BT and other broadband providers. DNS servers must be modified on devices on the network.

  • iOS

    • Settings > Wi-Fi > “Networking Name” > DNS (192.168.0.88 in this example)

  • Android

    • Settings > Long press on the Network Name > Manage Network Settings > Show Advanced Options > DNS 1

  • macOS

    • System Preferences > Network > Advanced > DNS Tab > +DNS Server

  • Windows 10

    • . Network and Sharing Centre > Click on the connection type > Properties > Internet Protocol Version 4 (TCP/IPv4) > Properties > Select “Use the following DNS server addresses” and add in the IP address of the Pi

Generate SSH-Keys to allow passwordless entry - this is an easy to follow

on their GitHub is best

Run sudo curl -sSL | bash

The Web interface will be installed automatically so you can view stats and change settings. You can find it at: or

Quoted from their

Pi-Hole
1)
PiFiller for macOS
Raspbian Jessie image
Raspbian Jessie image
PiFiller for macOS
guide
Install guide
https://install.pi-hole.net
http://192.168.1.x/admin/index.php
http://pi.hole/admin
1)
GitHub