Easily set up pihole and coredns to use DNS over TLS with Docker. Currently used on and tested on a single Raspberry Pi 4 but I'm sure it will work on any unix based system.
- Install docker and docker-compose
- Clone this repo
- Change to
coredns
directory and run thegenCerts.sh
script. - Go back to root directory and edit
docker-compose.yml
and set a web password. Also change the topmost DNS server for pihole to your gateway's IP. Mine happens to be10.30.0.1
- Run
docker-compose up -d
- Go to IP of server to enter pihole dashboard, deselect prior DNS settings and set DNS custom1 to
172.10.10.100#53
for coredns
Use any of the following:
kdig @IP +tls example.com
where IP is ip address of device running the containers
Open up shell on pihole container
docker exec -ti pihole bash
View all details about some container
docker inspect pihole