Skip to content

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

In the etc-dnsmasq.d folder create a 02-custom.conf file like so :

address=/lab.zrx.sh/192.168.31.99
address=/rpi.zrx.sh/192.168.31.99
address=/sol.zrx.sh/192.168.31.99
address=/vulcain.zrx.sh/192.168.31.99
address=/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).

I use all adlists from firebog.net.

Replaced with App iconAdguard Home.