Ok, this is my pihole for forum.txt file, that you need to copy and edit acording your needs:
note that yaml file is a bit especial, pleae DO NOT USE TAB, use only SPACES on IT or do not work.
and Thanks to tonylawrence for your reference post
# Note: 192.168.1.xxx is an example network, you must update all these to match your own. # Thanks to http://tonylawrence.com/posts/unix/synology/free-your-synology-ports/ for your reference post version: 2 services: pihole: container_name: pihole image: pihole/pihole:latest hostname: pihole domainname: yourdomain.org # <-- Update or leave comment if you do not have mac_address: d0:ca:ab:cd:ef:05 # <-- Update ( must be a random MAC, because you create a virtual NIC for it) cap_add: - NET_ADMIN networks: macvlan_NET: # <-- MACVlan Name no need to change, but do not exist previosly. ipv4_address: 192.168.1.2 # <-- Update; must be the IP that you want to use as DNS sever ( pihole IP) ports: - 443/tcp - 53/tcp - 53/udp - 67/udp - 80/tcp environment: ServerIP: 192.168.1.9 # <-- Update (match ipv4_address) VIRTUAL_HOST: pihole.yourdomain.org # <-- Update (match hostname + domainname) WEBPASSWORD: "MyPassWord" # <-- Add password (if required) DNS1: 188.8.131.52 DNS2: 184.108.40.206 # <-- Change by your prefered DNS service like 220.127.116.11 TZ: Europe/Madrid # <-- You need to add in webGUI not here # IPv6: False # <-- You need to add in webGUI not here volumes: - /home/dockers/pihole:/etc/pihole # <-- Update to match your real path ; your_nas_path:/etc/pihole - /home/dockers/pihole/dnsmasq.d:/etc/dnsmasq.d # same here restart: unless-stopped networks: macvlan_NET: driver: macvlan driver_opts: parent: enp5s0 # <- Update to match your NIC see your OMV WebGUI ipam: config: - subnet: 192.168.1.0/24 # <-- Update gateway: 192.168.1.1 # <-- Update ip_range: 192.168.1.2/28 # <-- Update
Please read about macvlan on dockers; is like if you create a virtual NIC
Now you need to create a stack like others in you install:
once you deploy the stack, you can find the recently created docker.
Notice That I need to add enviroments variables "TZ" & IPv6 into webGUI and not in the pihole.yaml file, I do not know why , but it works.
Note: Because is my second attempt to use Portainer and my first attemp to use macvlan, I agree if some power user revise my work and confirm that really works.
Thanks a lot.