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 can be installed on almost any Linux machine.
If you accessed this tutorial from a search engine you probably want to use Pi-hole for the ability to block traditional website advertisements as well as advertisements in unconventional places, such as smart TVs and mobile operating system advertisements.
If you want to use Pi-hole on Debian 11 and 12 here are the steps:
1. Download the Pi-hole installer by running the following commands in the terminal:
- Install the required packages by running the following command in the terminal:
sudo apt-get install wget curl net-tools gamin lighttpd lighttpd-mod-deflate
- Run the Pi-hole installer with the following command:
curl -sSL https://install.pi-hole.net | PIHOLE_SKIP_OS_CHECK=true sudo -E bash
2. Follow the prompts to configure your network settings and Pi-hole settings during the installation process.
3. To enable services needed by Pi-hole, run the following commands in the terminal: sudo systemctl enable pihole-FTL
and
sudo systemctl enable lighttpd
4. Optionally, you can change the password, management port, firewall rules, and DNS settings for Pi-hole.
5. Access the web interface to manage Pi-hole and view statistics.
- To repair Pi-hole on an unsupported OS, run the following command in the terminal:
PIHOLE_SKIP_OS_CHECK=true sudo -E pihole -r