lk/networking/pi-hole-server.md

78 lines
1.2 KiB
Markdown
Raw Normal View History

2022-01-26 22:35:07 +00:00
---
title: "pi-hole-server"
tags: [ "Documentation", "Distros" ]
---
# Installation
## Arch
```bash
yay -S pi-hole-server
```
2022-01-26 22:35:07 +00:00
```bash
sudo systemctl enable --now pihole-FTL
```
2022-01-26 22:35:07 +00:00
```bash
sudo systemctl disable --now systemd-resolved
```
2022-01-26 22:35:07 +00:00
```bash
sudo rm -f /dev/shm/FTL-\*
```
2022-01-26 22:35:07 +00:00
## Debian
Debian has a long, boring setup.
```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
```bash
sudo usermod -aG pihole $USER
```
2022-01-26 22:35:07 +00:00
Remove that google dns server.
```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.
```bash
pihole -a -p
```
2022-01-26 22:35:07 +00:00
Get a new list of blocked domains, then reload:
```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:
```bash
pihole -t
```
2022-01-26 22:35:07 +00:00
Then ask the question from another computer:
```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.