05. November 2022
Repeat the process twice if you can. This will Allow network Traffic through the backup if the primary is overloaded or offline
In an Ubuntu VM or Container
Become Root User. You Must Be Root User
1sudo su
Download and Install Pihole
1curl -sSL https://install.pi-hole.net | bash
Just use the default settings
change password
1pihole -a -p
Make this Docker-compose file
1version: "3"
2
3#
4
5services:
6 pihole:
7 container_name: pihole
8 image: pihole/pihole:latest
9 # For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
10 ports:
11 - "53:53/tcp"
12 - "53:53/udp"
13 - "67:67/udp"
14 - "80:80/tcp"
15 environment:
16 TZ: 'America/Phoenix'
17 # WEBPASSWORD: 'set a secure password here or it will be random'
18 volumes:
19 - './etc-pihole:/etc/pihole'
20 - './etc-dnsmasq.d:/etc/dnsmasq.d'
21 cap_add:
22 - NET_ADMIN
23 restart: unless-stopped # Recommended but not required (DHCP needs NET_ADMIN)
Change password
1docker exec -it pihole bash
2
3pihole - a -p
1sudo docker-compose up -d
Visit
http://<IP_ADDRESS_OF_YOUR_PI_HOLE>/admin/
1apiVersion: traefik.containo.us/v1alpha1
2kind: Middleware
3metadata:
4 name: pihole-prefix
5 namespace: default
6
7spec:
8 stripPrefix:
9 prefixes:
10 - /admin
Ubuntu 19.10, clean install not messed around. I use Docker and would like to install PiHole via Docker Compose.
However on Ubuntu systemd-resolve uses port 53 by default. That port needs to be available for port binding for PiHole. To solve this: sudo nano /etc/systemd/resolved.conf
Uncomment and change to no (everything is commented out by default):
DNSStubListener=no Restart the service.