Pi-hole has a document to configure DNS-Over-HTTPS. To automate the install and configure Cloudfared on a Raspberry Pi running Raspbian, I create a bash script. I also add the steps to lock down the cloudfared account.
Here are how set up Cloudfared DoH using the script.
- Make sure the Pi-hole is set up on your Raspberry Pi. See my post “Set up Pi-hole on a Raspberry Pi”.
- Download the script from my Github on your Raspberry Pi
- curl -O https://raw.githubusercontent.com/sfitpro/pi-hole/master/setup.cloudflared.doh.for.pi-hole.sh
- Grant the execution permission to the script
- chmod +x setup.cloudflared.doh.for.pi-hole.sh
- Run the script
- sudo ./setup.cloudflared.doh.for.pi-hole.sh
- Configure the Pi-hole to use custom Upstream DNS server 127.0.0.1#5053