Difference between revisions of "Pihole"

From Nick's Personal Wiki
Jump to navigation Jump to search
(Initial creation)
 
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
−
= Pihole =
+
= Requirements =
−
 
 
−
== Requirements ==
 
 
The requirements for a device to run Pihole on a network are not a particularly significant barrier of entry, but they do exist and need to be adhered to.  
 
The requirements for a device to run Pihole on a network are not a particularly significant barrier of entry, but they do exist and need to be adhered to.  
  
−
They can be found [docs.pi-hole.net/main/prerequisites/ here] but the short of it is that the device must be running one of the specified Linux distributions (that use systemd / sysvinit) on one of the common binary architectures, with a static IP address.
+
They can be found [https://docs.pi-hole.net/main/prerequisites/ here] but the short of it is that the device must be running one of the specified Linux distributions (that use systemd / sysvinit) on one of the common binary architectures, with a static IP address.
  
−
== Installing Pihole ==
+
= Installing Pihole =
 
Once a compatible device is obtained and running the host operating system, Pihole can be installed one of the following ways.  
 
Once a compatible device is obtained and running the host operating system, Pihole can be installed one of the following ways.  
  
−
=== Using curl ===
+
== Using curl ==
 
Install everything you need via the below command:
 
Install everything you need via the below command:
 
  <nowiki>curl -SSL https://install.pi-hole.net | bash</nowiki>
 
  <nowiki>curl -SSL https://install.pi-hole.net | bash</nowiki>
  
−
=== Cloning The Github Repository ===
+
This will execute the software for Pihole and begin the installation process.
 +
 
 +
== Cloning The Github Repository ==
 
Alternative to the above curl method, there is the option to install the packages from the official Github repository via:
 
Alternative to the above curl method, there is the option to install the packages from the official Github repository via:
 
  <nowiki>git clone --depth 1 https://github.com/pi-hole/pi-hole.git Pi-hole
 
  <nowiki>git clone --depth 1 https://github.com/pi-hole/pi-hole.git Pi-hole
 
cd "Pi-hole/automated install/"
 
cd "Pi-hole/automated install/"
 
sudo bash basic-install.sh</nowiki>
 
sudo bash basic-install.sh</nowiki>
 +
This will execute the software for Pihole and begin the installation process.
  
−
=== Manually Via The Installer ===
+
== Manually Via The Installer ==
 
There is also an official installer that is provided by the Pihole project, which can be retrieved and run like this:
 
There is also an official installer that is provided by the Pihole project, which can be retrieved and run like this:
 
  <nowiki>wget -O basic-install.sh https://install.pi-hole.net
 
  <nowiki>wget -O basic-install.sh https://install.pi-hole.net
 
sudo bash basic-install.sh</nowiki>
 
sudo bash basic-install.sh</nowiki>
 +
This will execute the software for Pihole and begin the installation process.
  
−
=== Via Docker ===
+
== Via Docker ==
 
Not covered at this time.
 
Not covered at this time.
  
−
== Configuring Pihole ==
+
= Configuring Pihole =
 +
Now that the compatible device/operating system is running, a static IP has been assigned to the device, the Pihole software is installed, and one of the above methods for executing the installer has been completed, Pihole will proceed with the configuration.
 +
 
 +
The configuration tool should proceed through setting up a DNS provider, asking which domain block lists are desired (additional lists can be added later, none of these are required), whether Query Logging should be enabled/disabled, how specific those logs should be, etc. Installation should be completed once a splash page is provided with the URL of the administration dashboard '''along with the default password that will be used to login'''.
 +
 
 +
= Administration Dashboard =
 +
The administration dashboard for your Pihole device will likely be located somewhere like this:
 +
<nowiki>http://[HOSTNAME_THAT_WAS_CONFIGURED_FOR_DEVICE].local/admin/login</nowiki>
 +
 
 +
On the dashboard there should be instructions/commands that can be used from the terminal of your device to reset the default password for the administration dashboard, this is '''HIGHLY''' recommended.
 +
<nowiki>sudo pihole setpassword</nowiki>
 +
 
 +
= Directing Other Devices To The Pihole For DNS =
 +
Once all of the above has been completed, the Pihole software has been successfully configured, however it will not block any DNS calls if it doesn't receive any from other devices.
 +
 
 +
Every router handles this differently, but the Pihole's Static IP address needs to be configured as the network's DNS provider. Once completed, DNS traffic is passed through the Pihole, queries that should be blocked (based on the blocklists provided to the Pihole) are blocked, and other requests are allowed to pass to their intended destinations via the router like normal.
 +
 
 +
If the router for the network does not support the ability to set a specific DNS server, the Pihole can also be configured to run as a DHCP server for other clients, but '''be sure to disable DHCP on the router before enabling it on the Pihole'''.

Latest revision as of 04:08, 13 November 2026

Requirements

The requirements for a device to run Pihole on a network are not a particularly significant barrier of entry, but they do exist and need to be adhered to.

They can be found here but the short of it is that the device must be running one of the specified Linux distributions (that use systemd / sysvinit) on one of the common binary architectures, with a static IP address.

Installing Pihole

Once a compatible device is obtained and running the host operating system, Pihole can be installed one of the following ways.

Using curl

Install everything you need via the below command:

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

This will execute the software for Pihole and begin the installation process.

Cloning The Github Repository

Alternative to the above curl method, there is the option to install the packages from the official Github repository via:

git clone --depth 1 https://github.com/pi-hole/pi-hole.git Pi-hole
cd "Pi-hole/automated install/"
sudo bash basic-install.sh

This will execute the software for Pihole and begin the installation process.

Manually Via The Installer

There is also an official installer that is provided by the Pihole project, which can be retrieved and run like this:

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

This will execute the software for Pihole and begin the installation process.

Via Docker

Not covered at this time.

Configuring Pihole

Now that the compatible device/operating system is running, a static IP has been assigned to the device, the Pihole software is installed, and one of the above methods for executing the installer has been completed, Pihole will proceed with the configuration.

The configuration tool should proceed through setting up a DNS provider, asking which domain block lists are desired (additional lists can be added later, none of these are required), whether Query Logging should be enabled/disabled, how specific those logs should be, etc. Installation should be completed once a splash page is provided with the URL of the administration dashboard along with the default password that will be used to login.

Administration Dashboard

The administration dashboard for your Pihole device will likely be located somewhere like this:

http://[HOSTNAME_THAT_WAS_CONFIGURED_FOR_DEVICE].local/admin/login

On the dashboard there should be instructions/commands that can be used from the terminal of your device to reset the default password for the administration dashboard, this is HIGHLY recommended.

sudo pihole setpassword

Directing Other Devices To The Pihole For DNS

Once all of the above has been completed, the Pihole software has been successfully configured, however it will not block any DNS calls if it doesn't receive any from other devices.

Every router handles this differently, but the Pihole's Static IP address needs to be configured as the network's DNS provider. Once completed, DNS traffic is passed through the Pihole, queries that should be blocked (based on the blocklists provided to the Pihole) are blocked, and other requests are allowed to pass to their intended destinations via the router like normal.

If the router for the network does not support the ability to set a specific DNS server, the Pihole can also be configured to run as a DHCP server for other clients, but be sure to disable DHCP on the router before enabling it on the Pihole.