Hi, please help me with my Pi-hole setup on Synology NAS. Here is the situation:
Pi-hole + Unbound in one container running on Synology
Setup everything using macvlan + bridge method
Synology has static IP of 192.168.5.2
Pi-hole on macvlan with static IP of 192.168.5.3/32 + bridge network IP of 192.168.90.2/32
Unbound on macvlan with static IP of 192.168.5.4/32
After setup, everything work as expected and I've been able to get different devices on other vlans to go through pi-hole. However I could not get the Nas to use pi-hole dns with the bridge network. I'm not really sure why and where to start looking.
- I've tried to set DNS manually in DSM setting to use 192.168.90.2 but it does not work.
- Tried to ssh to NAS, run nslookup youtube.com 192.168.90.2 and got connection timed out; no servers could be reached. Any advice would be much appreciated.
Here is my .yaml file, please take a look. Thank you !!!
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
hostname: Pi-hole
cap_add: # Uncomment if you want to use Pi-Hole for DHCP
- CAP_NET_RAW
- CAP_NET_BIND_SERVICE
- CAP_CHOWN
ports:
- 53/tcp
- 53/udp
# - 67/udp # Uncomment if you want to use Pi-Hole for DHCP
- 80/tcp
environment:
- PIHOLE_UID=1028 #CHANGE_TO_YOUR_UID
- PIHOLE_GID=65537 #CHANGE_TO_YOUR_GID
- FTLCONF_LOCAL_IPV4=192.168.5.3
- WEBPASSWORD=password
- PIHOLE_DNS_=192.168.5.4
- TZ=Asia/Ha_Noi
- DNSMASQ_USER=root
- DNSMASQ_LISTENING=local
volumes:
- /volume1/docker/pihole-unbound/pihole/pihole:/etc/pihole:rw
- /volume1/docker/pihole-unbound/pihole/dnsmasq.d:/etc/dnsmasq.d/:rw
networks:
macvlan:
ipv4_address: 192.168.5.3
bridge:
ipv4_address: 192.168.90.2
restart: always
unbound:
container_name: unbound
image: mvance/unbound:latest
ports:
- 53/tcp
- 53/udp
networks:
macvlan:
ipv4_address: 192.168.5.4
restart: always
networks:
macvlan:
name: macvlan
driver: macvlan
driver_opts:
parent: eth0
ipam:
config:
- subnet: 192.168.5.0/24
ip_range: 192.168.5.3/30
gateway: 192.168.5.1
bridge:
name: ph-bridge
driver: bridge
ipam:
config:
- subnet: 192.168.90.0/24
ip_range: 192.168.90.2/32
gateway: 192.168.90.1