mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
Improved all about pi-hole
This commit is contained in:
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@@ -35,6 +35,7 @@
|
||||
"ocsp",
|
||||
"pacman",
|
||||
"pamac",
|
||||
"pihole",
|
||||
"pkexec",
|
||||
"polkit",
|
||||
"pvresize",
|
||||
|
||||
@@ -1,2 +1,5 @@
|
||||
# Update Graviton's DB once a week (at midnight on Sundays).
|
||||
0 0 * * 0 docker ps -f 'name=pihole' -f 'status=running' -f 'health=healthy' -q | xargs -I{} docker exec {} pihole -g
|
||||
# Update Graviton's DB once a week (at 3:00 on Sundays).
|
||||
0 3 * * 0 docker ps -f 'name=pihole' -f 'status=running' -f 'health=healthy' -q | xargs -I{} docker exec {} pihole -g
|
||||
|
||||
# Create a complete backup once a week (at 3:30 on Sundays).
|
||||
30 3 * * 0 docker ps -f 'name=pihole' -f 'status=running' -f 'health=healthy' -q | xargs -I{} docker exec {} pihole -a -t /etc/pihole/teleporter_backup.tar.gz
|
||||
|
||||
@@ -1,36 +1,30 @@
|
||||
version: "3.2"
|
||||
|
||||
secrets:
|
||||
webpassword:
|
||||
file: ./webpassword
|
||||
|
||||
services:
|
||||
pihole:
|
||||
container_name: pihole
|
||||
image: pihole/pihole:latest
|
||||
image: pihole/pihole:2023.01.10
|
||||
environment:
|
||||
FTLCONF_LOCAL_IPV4: 127.0.0.1
|
||||
REV_SERVER_CIDR: 192.168.1.0/24
|
||||
REV_SERVER_DOMAIN: localdomain
|
||||
REV_SERVER_TARGET: 192.168.1.1
|
||||
REV_SERVER: "true"
|
||||
SKIPGRAVITYONBOOT: 1
|
||||
TZ: Europe/Amsterdam
|
||||
WEBPASSWORD_FILE: /run/secrets/webpassword
|
||||
# DNSMASQ_LISTENING: all # Only required if using Docker's default 'bridge' network setting
|
||||
volumes:
|
||||
- ./etc-pihole:/etc/pihole
|
||||
- ./etc-dnsmasq.d:/etc/dnsmasq.d
|
||||
- ./etc/pihole:/etc/pihole
|
||||
- ./etc/dnsmasq.d:/etc/dnsmasq.d
|
||||
dns:
|
||||
- 127.0.0.1
|
||||
- 1.1.1.1
|
||||
restart: unless-stopped
|
||||
secrets:
|
||||
- webpassword
|
||||
|
||||
# If using the container's DHCP server it is recommended to replace the
|
||||
# 'ports' definition with the 'network_mode' definition instead.
|
||||
network_mode: "host"
|
||||
# ports:
|
||||
# - "53:53/tcp"
|
||||
# - "53:53/udp"
|
||||
# - "67:67/udp" # Only required if using the DHCP server component.
|
||||
# - "80:80/tcp"
|
||||
|
||||
# Only required if using the DHCP server component.
|
||||
# cap_add:
|
||||
# - NET_ADMIN
|
||||
ports:
|
||||
- "53:53/tcp"
|
||||
- "53:53/udp"
|
||||
- "80:80/tcp"
|
||||
|
||||
@@ -16,5 +16,14 @@ stat /etc/pihole/gravity.db
|
||||
## Further readings
|
||||
|
||||
- Pi-hole's [repository]
|
||||
- The [pihole] command
|
||||
- [Run Pi-hole as a container with Podman on openSUSE]
|
||||
|
||||
<!-- project's references -->
|
||||
[repository]: https://github.com/pi-hole/pi-hole
|
||||
|
||||
<!-- internal references -->
|
||||
[pihole]: pihole.md
|
||||
|
||||
<!-- external references -->
|
||||
[run pi-hole as a container with podman on opensuse]: https://www.suse.com/c/pihole-podman-opensuse/
|
||||
|
||||
49
knowledge base/pihole.md
Normal file
49
knowledge base/pihole.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# Pihole
|
||||
|
||||
## TL;DR
|
||||
|
||||
```sh
|
||||
# Check the status.
|
||||
pihole status
|
||||
|
||||
# Temporarily disable blocking.
|
||||
pihole disable '5m'
|
||||
|
||||
# Follow the logs in real-time.
|
||||
pihole tail
|
||||
|
||||
# Set or change the Web Interface's password.
|
||||
pihole -a -p
|
||||
pihole -a -p 'new-password'
|
||||
|
||||
# Show Chronometer, the console dashboard of real-time stats.
|
||||
pihole -c
|
||||
|
||||
# Show Chronometer and exit.
|
||||
pihole -c -e
|
||||
|
||||
# Empty Pi-hole's logs.
|
||||
pihole flush
|
||||
|
||||
# Update Graviton's DB.
|
||||
pihole -g
|
||||
|
||||
# Backup all settings and the configuration.
|
||||
# Without a path, the backup will be created in the current directory.
|
||||
# The resulting archive can be imported using the Settings > Teleport webpage.
|
||||
pihole -a -t
|
||||
pihole -a -t 'path/to/backup/file.tar.gz'
|
||||
```
|
||||
|
||||
## Further readings
|
||||
|
||||
- [Pi-hole]
|
||||
- [The pihole command]
|
||||
|
||||
<!-- project's references -->
|
||||
[the pihole command]: https://docs.pi-hole.net/core/pihole-command/
|
||||
|
||||
<!-- internal references -->
|
||||
[pi-hole]: pi-hole.md
|
||||
|
||||
<!-- external references -->
|
||||
Reference in New Issue
Block a user