Last active
August 13, 2022 23:19
-
-
Save tntwist/a6183bbf736d7d652d1fc01a32c9c19a to your computer and use it in GitHub Desktop.
pi-hole and cloudflared(dns over https) with ipv6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requirements | |
#1. Enable IPv6 for the docker daemon: | |
#$ cat /etc/docker/daemon.json | |
#{ | |
# "ipv6": true, | |
# "fixed-cidr-v6": "2001:db8:1::/64" | |
#} | |
#2. reload docker : | |
#$ sudo systemctl reload docker | |
#3. start: | |
#$ docker-compose -f docker-compose.yml up -d | |
version: "2.1" | |
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/ | |
services: | |
cloudflared: | |
container_name: cloudflared | |
image: visibilityspots/cloudflared:arm | |
restart: unless-stopped | |
networks: | |
pihole_net: | |
ipv4_address: 10.0.0.2 | |
ipv6_address: 2001:3200:3200::20 | |
sysctls: | |
- net.ipv6.conf.all.disable_ipv6=0 | |
pihole: | |
container_name: pihole | |
image: pihole/pihole:latest | |
ports: | |
- "53:53/tcp" | |
- "53:53/udp" | |
- "67:67/udp" | |
- "81:80/tcp" | |
- "443:443/tcp" | |
environment: | |
- TZ=Europe/Berlin | |
- WEBPASSWORD=YOURPW | |
- IPv6=true | |
- ServerIP=192.168.178.22 #IPv4 address of docker host | |
- ServerIPv6=2a02:908:3710:7ce0:5c5e:cdf1:d051:4026 #IPv6 address of docker host | |
- DNS1='10.0.0.2#5054' | |
- DNS2='2001:3200:3200::20#5054' | |
- DNSMASQ_LISTENING=all | |
networks: | |
pihole_net: | |
ipv4_address: 10.0.0.3 | |
ipv6_address: 2001:3200:3200::30 | |
# Volumes store your data between container upgrades | |
volumes: | |
- './etc-pihole/:/etc/pihole/' | |
- './etc-dnsmasq.d/:/etc/dnsmasq.d/' | |
dns: | |
- 127.0.0.1 | |
- 8.8.8.8 | |
# Recommended but not required (DHCP needs NET_ADMIN) | |
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities | |
cap_add: | |
- NET_ADMIN | |
sysctls: | |
- net.ipv6.conf.all.disable_ipv6=0 | |
restart: unless-stopped | |
networks: | |
pihole_net: | |
driver: bridge | |
enable_ipv6: true | |
ipam: | |
config: | |
- subnet: 10.0.0.0/29 | |
- subnet: 2001:3200:3200::/64 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks again for this additional info. :)
Question: what's the best way to reset things if I need to further modify the docker-compose.yml file? Should I
docker-compose down
the container and completely start over, or is there a way to load in the new changes without destroying the container?At this point I've done literally nothing except log into the admin console and stare at it a bit, so deleting the image is no big deal...
Awesome!
I will check this out. I'm glad this sounds like an easily solvable problem.
EDIT: The IPv6 address is definitely changing. It has changed since I checked it last night, without any reboot.
I will try this and see what I get back. My computer has suddenly decided to melt, so I think a restart is in order...
Mine is ... definitely not. I'll make sure the IPv6 host address is right and try again.