Skip to main content

Synology - PiHole Configuration

This is to create a MAC vlan on you synology to bridge interfaces

You will need to create the following folders from the main docker folder.

docker/pihole
docker/pihole/pihole
docker/pihole/dnsmasq.d

My testing vlan uses 192.168.253.0/24

sudo docker network create -d macvlan -o parent=eth3 --subnet=192.168.253.0/24 --gateway=192.168.253.1 --ip-range=192.168.253.44/32 ph_network

YAML Configurations

version: "3"
services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "67:67/udp" 
      - "80:80/tcp"
    networks:
     - ph_network
     - ph_bridge
    environment:
      TZ: 'America/Montreal'
      FTLCONF_webserver_api_password: '[Your_Password_Here]'
      DNSMASQ_LISTENING: local
    volumes:
      - '/volume1/docker/pihole/pihole:/etc/pihole'
      - '/volume1/docker/pihole/dnsmasq.d:/etc/dnsmasq.d'
    cap_add:
      - NET_ADMIN
    restart: unless-stopped
networks:
    ph_bridge:
      driver: bridge
      ipam:
        config:
          - subnet: 192.168.100.0/24
            gateway: 192.168.100.1
            ip_range: 192.168.100.2/32
    ph_network:
      name: ph_network
      external: true

Accessing the pi-hole remotely

https://192.1638.253.44/admin



If you are 7.1 DSM you will need to use this command

docker-compose -f /volume1/docker/pihole/compose.yaml up -d