Requirements:
- crazymax/cloudflared
- pihole docker image
- pi-hole br0 ip address, such as 192.168.1.5
- cloudflared br0 ip adderss, such as 192.168.1.10
- Configure the following parameters in pihole docker image:
- 53/TCP and 53/UDP
- 67/UDP
- 80/TCP
- Configuration
- Container path: /etc/pihole
- Host path: /path/to/pihole
- DNSMasq
- Container path: /etc/dnsmasq.d
- Host path: /path/to/pihole/dnsmasq.d
- TZ=America/New_York
- DNS1=192.168.1.10#5053 <-- this is the cloudflared container IP address. Yes include the
#
- DNS2=no
- DNSMASQ_LISTENING=ALL
- EXTRAPARAMETERS= --restart=unless-stopped
-
Make sure extra paramters looks like this for the pihole image
-
Make sure the settings in pi-hole looks like this. Custom DNS 1 will be your DNS1 entry from docker.
-
Make sure the advanced DNS settings in pi-hole looks like this
-
For the cloudflared docker image, make sure to set privileged to on. Example configuration
-
Restart both cloudflared and pi-hole. Test by setting your mobile device to the pi-hole IP address only, such as 192.168.1.5 in our example. Then visit a website and make sure DNS resolution works.
You're welcome, Erik.