Pi-Hole Installation Guide

Pi-hole is a remarkably useful tool that enhances your internet experience by providing comprehensive ad-blocking capabilities. By blocking ads at the network level, Pi-hole ensures that all devices connected to your network, from smartphones to smart TVs, enjoy an ad-free browsing experience. This not only eliminates annoying and intrusive ads but also improves page loading times and reduces bandwidth consumption. Pi-hole goes beyond ad-blocking by enhancing privacy and security. It blocks tracking domains, protecting your personal information and shielding you from targeted advertising. With its customizable features and compatibility with various operating systems, Pi-hole is a user-friendly solution that significantly enhances your online privacy, security, and overall browsing satisfaction.

Used Components

  • Raspberry Pi 4 Model B 4GB [Starter Kit]
  • SanDisk MicroSD 32 GB

What is additionally needed?

  • Required: Internet-Connection
  • Required: estimated 30 Minutes
  • Recommend: Ethernet Cable for the PI

Install Raspberry PI OS

If you have a clean SD Card with no OS installed previously you can follow this steps here or you can skip this part and go straight to the Installation of Pi-Hole.

  1. Download the Rasperberyy PI OS Installer from the official Website
  2. Insert the MicroSD Card into your computer
  3. Run the imager
  4. Select the wanted OS from the left Selection Button
    • Because I only need the basics, I rely on the „Rapsberry PI OS Lite (Legacy)“ with no desktop enviroment
  5. If not automatically selected, choose the correct storage to write

Now you have to decide if you want to user your PI in combination with a Mouse, Keyboard and a Monitor or if you want to remote connect.

The old variant to add an SSH file i the Explorer and Connect with pi and raspberry is obsolet and can not be used anymore.

If you want to set up remote connect during installation to use the pi afterwards only via remote, do the following:

  1. Click on the Gear Icon in the Imager
  2. Enable SSH
  3. Setup Username and Password and remember those
    • A classic combination is pi and raspberry as password
  4. Click Save and then Click Write

If you don’t need SSH in the first place ignore this steps and Click on Write without adjusting any settings.

After finishing remove the SD Card and install it in the PI. After that power on the PI and Connect it to the Router.

Adjust Settings in the Router

To maximize the effectiveness of Pi-hole and ensure a stable network setup, it is crucial to access your router’s configuration page and assign a static IP address to your Pi-hole device. Assigning a static IP address guarantees that Pi-hole retains a consistent and fixed IP, even in scenarios such as router reboots or device reconnections. This configuration eliminates the risk of IP address changes and ensures seamless access and management of Pi-hole. While router configurations can vary, it is highly recommended to consult your router manufacturer’s manual for detailed instructions on how to assign a static IP address.

Connect to the PI

In this tutorial we use the remote Connection via SSH over Windows PowerShell.

  • Open Windows PowerShell an connect to the PI as following
ssh pi@IPADDRESS

Replace pi with the username you chose and the address with the Static IP you configured before

  • After that you have to accept the fingerprint and prompt the password.

You successfully connect to your PI.

Install PI-Hole

Before installing PI-Hole make sure your system is up to date

sudo apt-get update
sudo apt-get upgrade

After that is as simple as it could be. Use the following command

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

During the installation process, you will be presented with an Installation Prompt that will guide you through the necessary steps. If you are unsure about which options to choose, it is generally safe to stick with the default settings, as they are suitable for most users‘ needs.

In the end of the installation guide you get a message where a password for the admin page of pihole is provided. Please write it down.

You now successfully installed PI-Hole.

Configure PI-Hole

To access most settings of your Pi-hole, you need to go to the admin page. This can be done by entering the IP address of your Pi followed by „/admin“ in your web browser. For example, it might look like „192.168.2.5/admin“.

To log in, use the password that was provided during the Installation Guide.

If you wish to enable network-wide ad-blocking for all devices, the simplest method is to activate the DHCP feature of Pi-Hole.

Navigate to the Settings page and select the checkbox under the DHCP tab. Before saving the changes, it is important to disable DHCP in your router’s settings. For specific instructions, consult your router manufacturer’s manual.

To expand the blocklist, go to Adlists on the left side of the page. A reliable source for blocklists is the Firebog website. Copy the desired blocklist URLs and add them to your Pi-hole.

Once you have completed these steps, go to Settings -> Update Gravity. This will update your blocklist, and you will notice an increased number of blocked domains in the Pi-hole dashboard.

There are a few more settings you can use:

  1. Upstream DNS Servers: Access the Pi-hole web interface and navigate to Settings -> DNS. Here, you can specify the upstream DNS servers that Pi-hole should use for resolving DNS queries. By default, Pi-hole uses your ISP’s DNS servers, but you can choose alternative servers like Google DNS or Cloudflare DNS for improved performance and privacy.
  2. Whitelisting and Blacklisting: Manage domain whitelisting and blacklisting to customize Pi-hole’s blocking behavior. In the Pi-hole web interface, go to Settings -> Blocklists to add domains to the blacklist or manually remove entries. Additionally, visit Settings -> Whitelist to ensure that specific domains are never blocked.
  3. Query Logging: Enable or disable query logging in the Pi-hole web interface by going to Settings -> System. Query logs are useful for troubleshooting or monitoring DNS activity on your network.
  4. Custom DNS Records: Configure custom DNS records to map domain names to specific IP addresses. This is beneficial for local network configurations or accessing local services by domain name. Access the Pi-hole web interface and navigate to Settings -> Local DNS Records to add and manage custom DNS records.
  5. Web Interface Password: Set a strong password to secure access to the Pi-hole web interface. To update the password, go to Settings -> API / Web Interface in the Pi-hole web interface and set a new password.

In conclusion, the installation and basic configuration of Pi-hole provide a solid foundation for harnessing its powerful ad-blocking capabilities. By following the installation guide and accessing the web interface, you can customize settings.

However, it’s important to note that Pi-hole offers much more than just these surface-level configurations.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert