2022-01-26 22:35:07 +00:00
|
|
|
---
|
|
|
|
title: "pi-hole-server"
|
|
|
|
tags: [ "Documentation", "Distros" ]
|
|
|
|
---
|
|
|
|
# Installation
|
|
|
|
|
|
|
|
## Arch
|
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
yay -S pi-hole-server
|
|
|
|
```
|
2022-01-26 22:35:07 +00:00
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
sudo systemctl enable --now pihole-FTL
|
|
|
|
```
|
2022-01-26 22:35:07 +00:00
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
sudo systemctl disable --now systemd-resolved
|
|
|
|
```
|
2022-01-26 22:35:07 +00:00
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
sudo rm -f /dev/shm/FTL-\*
|
|
|
|
```
|
2022-01-26 22:35:07 +00:00
|
|
|
|
|
|
|
## Debian
|
|
|
|
|
|
|
|
Debian has a long, boring setup.
|
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
sudo apt-get install wget curl net-tools gamin lighttpd lighttpd-mod-deflate
|
|
|
|
curl -sSL https://install.pi-hole.net | PIHOLE_SKIP_OS_CHECK=true sudo -E bash
|
|
|
|
```
|
2022-01-26 22:35:07 +00:00
|
|
|
|
|
|
|
# Setup
|
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
sudo usermod -aG pihole $USER
|
|
|
|
```
|
2022-01-26 22:35:07 +00:00
|
|
|
|
|
|
|
Remove that google dns server.
|
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
pihole -a setdns 9.9.9.9 1.0.0.1
|
|
|
|
```
|
2022-01-26 22:35:07 +00:00
|
|
|
|
|
|
|
Disable pihole password by setting a blank password.
|
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
pihole -a -p
|
|
|
|
```
|
2022-01-26 22:35:07 +00:00
|
|
|
|
|
|
|
Get a new list of blocked domains, then reload:
|
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
pihole -g -r
|
|
|
|
```
|
2022-01-26 22:35:07 +00:00
|
|
|
|
|
|
|
Every so often, run `pihole -g` again (perhaps put it in crontab).
|
|
|
|
|
|
|
|
## Check the Pihole
|
|
|
|
|
|
|
|
Observe the pihole's output while you ask it a question:
|
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
pihole -t
|
|
|
|
```
|
2022-01-26 22:35:07 +00:00
|
|
|
|
|
|
|
Then ask the question from another computer:
|
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
dig @[ pihole ip ] archlinux.org
|
|
|
|
```
|
2022-01-26 22:35:07 +00:00
|
|
|
|
|
|
|
## System-Wide Setup
|
|
|
|
|
|
|
|
To make the pihole work for the entire Network, enter your router and set the DNS server as nothing but your pihole.
|
|
|
|
|