Pi-hole is a network-level advertisement and Internet tracker blocking application which acts as a DNS sinkhole and optionally a DHCP server, intended for use on a private network.
My setup is kind of simple, I use a pihole instance that is set to be my main router DNS and my main tailscale DNS. And by taking benefits of tailscale subnet routers we can access pihole and resolve my machine from everywhere.
Set the “WEBPASSWORD” env var and use the following docker-compose :
version: "3"
services: home: image: pihole/pihole:latest container_name: pihole hostname: pihole environment: TZ: 'Europe/Paris' WEBPASSWORD: '---' PIHOLE_UID: 0 IPv6: "false" WEB_PORT: 8117 CORS_HOSTS: dashboard.lab.raphael-catarino.fr volumes: - /home/raphaelgc/apps/pihole/data/etc-pihole/:/etc/pihole/ - /home/raphaelgc/apps/pihole/data/etc-dnsmasq.d/:/etc/dnsmasq.d cap_add: - NET_ADMIN restart: unless-stopped network_mode: host
Redirecting custom domains
Section titled “Redirecting custom domains”In the etc-dnsmasq.d
folder create a 02-custom.conf
file like so :
address=/lab.zrx.sh/192.168.31.99address=/rpi.zrx.sh/192.168.31.99address=/sol.zrx.sh/192.168.31.99address=/vulcain.zrx.sh/192.168.31.99address=/cloudlab.zrx.sh/192.168.31.99
This will redirect every *.lab.zrx.sh
/ *.rpi.zrx.sh
/ *.sol.zrx.sh
/ *.vulcain.zrx.sh
/ *.cloudlab.zrx.sh
to 192.168.31.99 (reverse-proxy).
Adlists
Section titled “Adlists”I use all adlists from firebog.net.
Deprecated
Section titled “Deprecated”Replaced with Adguard Home.