Pihole
You first need to free port 53 on the Pi :
sudo nano /etc/systemd/resolved.conf
[Resolve]
DNS=1.1.1.1
FallbackDNS=1.0.0.1
#Domains=
#DNSSEC=no
#DNSOverTLS=no
#MulticastDNS=yes
#LLMNR=yes
#Cache=yes
#DNSStubListener=yes
#DNSStubListenerExtra=
#ReadEtcHosts=yes
#ResolveUnicastSingleLabel=no
DNSStubListener=no
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
sudo reboot now
Then create ./Pihole/etc-pihole/ and ./Pihole/etc-dnsmasq.d/
Now you can Install Pi-hole
---
version: '3.3'
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: Europe/Paris
WEBPASSWORD: 01664892ganjah12xxxxxx
DNS1: 1.1.1.1
DNS2: 1.0.0.1
DNSSEC: 'true'
volumes:
- /srv/dev-disk-by-uuid-aeb64686-5ba2-4319-a690-3215ec812b5d/path/Files/Pihole/etc-pihole/:/etc/pihole/
- /srv/dev-disk-by-uuid-aeb64686-5ba2-4319-a690-3215ec812b5d/path/Files/Pihole/etc-dnsmasq.d/:/etc/dnsmasq.d/
cap_add:
- NET_ADMIN
restart: unless-stopped
You might want to restart your modem / router.
To undo the changes :
Edit /etc/systemd/resolved.conf
sudo nano /etc/systemd/resolved.conf
Comment out DNS=
, FallbackDNS=
and DNSStubListener=no
Remove the /etc/resolv.conf
symbolic link:
sudo rm /etc/resolv.conf
Reboot.