Last active
October 14, 2023 21:29
-
-
Save dnburgess/5caf8ff10f65bdc2467d532f55753774 to your computer and use it in GitHub Desktop.
DB Tech Pi-hole on Pi 4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
version: 2 | |
services: | |
pihole: | |
container_name: pihole | |
image: pihole/pihole:latest | |
ports: | |
- 53:53/tcp #DNS Port | |
- 53:53/udp #DNS Port | |
#- 67:67/udp #DHCP Port | |
- 83:80/tcp #Dashboard Port | |
#- 443:443/tcp #Port 443 is to provide a sinkhole for ads that use SSL. | |
environment: | |
TZ: America/Denver | |
WEBPASSWORD: password | |
DNS1: 1.1.1.1 | |
DNS2: 1.0.0.1 | |
DNSSEC: 'true' | |
volumes: | |
- /srv/dev-disk-by-label-Files/Config/Pihole/etc-pihole/:/etc/pihole/ | |
- /srv/dev-disk-by-label-Files/Config/Pihole/etc-dnsmasq.d/:/etc/dnsmasq.d/ | |
cap_add: | |
- NET_ADMIN | |
restart: unless-stopped | |
This won't work out of the box as Raspbian has port 53 being used. We need to stop and reconfigure the service using it. | |
To stop systemd-resolved, run this command: | |
sudo systemctl stop systemd-resolved | |
To edit systemd-resolved, run this command: | |
sudo nano /etc/systemd/resolved.conf | |
Edit the file so it looks like this: | |
[Resolve] | |
DNS=1.1.1.1 | |
FallbackDNS=1.0.0.1 | |
#Domains= | |
#LLMNR=yes | |
#MulticastDNS=yes | |
#DNSSEC=allow-downgrade | |
#DNSOverTLS=no | |
#Cache=yes | |
#DNSStubListener=yes | |
#ReadEtcHosts=yes | |
DNSStubListener=no | |
Save and exit. | |
To create a symlink of the changes you made, run this command: | |
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf | |
ghost
commented
May 20, 2021
via email
•
Hi,
Thnx for your reply, will have a look at Pi-Hole + Unbound.
For anyone looking, here is a revised and fixed version 3:
version: "3"
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
- "53:53/tcp"
- "53:53/udp"
- "83:80/tcp"
environment:
TZ: 'America/Chicago'
# WEBPASSWORD: 'password'
volumes:
- /srv/dev-disk-by-label-Files/Config/Pihole/etc-pihole/:/etc/pihole/
- /srv/dev-disk-by-label-Files/Config/Pihole/etc-dnsmasq.d/:/etc/dnsmasq.d/
cap_add:
- NET_ADMIN
restart: unless-stopped
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment