Hello RonV42, I'm just following your thread here, would you be able to check my version of your docker-compose.yml please?
Version: '2' services: pihole: container_name: pihole image: pihole/pihole:latest hostname: pihole domainname: local # <-- Update # mac_address: d0:ca:ab:cd:ef:01 cap_add: - NET_ADMIN networks: pihole_network: ipv4_address: 192.168.1.251 # <-- Update dns: - 188.8.131.52 - 184.108.40.206 ports: - 443/tcp - 53/tcp - 53/udp - 67/udp - 80/tcp environment: ServerIP: '192.168.1.251' # <-- Update (match ipv4_address) VIRTUAL_HOST: 'pihole.local' # <-- Update (match hostname + domainname) WEBPASSWORD: 'letmein' # <-- Add password (if required) TZ: 'Europe/London' IPv6: 'false' DHCP_ACTIVE: 'true' DHCP_START: '192.168.1.201' DHCP_END: '192.168.1.249' DHCP_ROUTER: '192.168.1.254' DHCP_LEASETIME: '2' DHCP_IPv6: 'false' DHCP_rapid_commit: 'true' DNS1: 192.168.1.250#53 # <-- DNS1 of pihole configured to DNSCRYPT address DNS2: 192.168.1.250x#53 # <-- DNS2 of pihole configured to DNSCRYPT address volumes: - '/etc/pihole/:/etc/pihole/' - '/etc/dnsmasq.d/:/etc/dnsmasq.d/' restart: unless-stopped dnscrypt: container_name: dnscrypt-proxy image: gists/dnscrypt-proxy:latest hostname: dnscrypt domainname: local # <-- Update ports: - 53/udp - 53/tcp networks: pihole_network: ipv4_address: 192.168.1.250 # <--Update volumes: - '/etc/dnscrypt-proxy/dnscrypt-proxy.toml:/etc/dnscrypt-proxy/dnscrypt-proxy.toml' # <--custom toml file for easy editing restart: always networks: pihole_network: driver: macvlan driver_opts: parent: eth0 # <-- validate the native network inferface on host ipam: config: - subnet: 192.168.1.0/24 # <-- Update gateway: 192.168.1.254 # <-- Update ip_range: 192.168.1.0/32 # <-- Update
I think my main questions are as follows:
line 7, your version had hostname: pihole2, is there a reason that you added the number 2? So that it doesn't conflict with anything? Am I ok with just pihole?
line 14 (ipv4 address) and line 25 (ServerIP) ==> should these match? I'm guessing so.
why do you have dns entries (lines 16 and 17) and DNS1 and DNS2 (lines 37 and 38)? Are the entries in lines 16 and 17 fallback addresses incase DNS1 and DNS2 aren't available?
am I ok still to use DNS1 and DNS2 entries? Should I be using PIHOLE_DNS_ instead?
does dnscrypt-proxy.toml (line 56 get created when DNScrypt is pulled/run for the first time?
I am a little confused as to ip_range (line 68) with the /32 subnet mask ==> what range is this referring to? the DHCP range that I have already defined for Pi-hole in lines 31 and 32?
Or is it a range that dnscrypt will use? Please advise?
Basically I want to design my network like this:
Docker Host Raspberry Pi 2 eth0: 192.168.1.251
Pi-hole container: 192.168.1.251
DNScrypt container: 220.127.116.11
DHCP range given out by Pi-hole: 192.168.1.1 - 192.168.1.249
(I'm presuming the Docker Host can have the same IP of the Pi-hole container...correct?)
Thank you for your time and assistance, it is sincerely appreciated.