Open varunpan opened 2 years ago
i tested without using portainer and i am getting the same issues, where pihole keeps restarting.
I was able to get it working by updating the docker-compose to:
version: '3.0'
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
hostname: pihole
mac_address: d0:ca:ab:cd:ef:01
cap_add:
- NET_ADMIN
ports:
- 443/tcp
- 53/tcp
- 53/udp
- 67/udp
- 80/tcp
- 22/tcp
environment:
- FTLCONF_REPLY_ADDR4=192.168.1.5
- WEBPASSWORD=${WEBPASSWORD}
- PIHOLE_DNS_=192.168.1.6;192.168.1.6
volumes:
- /home/mainpi/.docker/pihole-unbound/pihole/config:/etc/dnsmasq.d:rw
- /home/mainpi/.docker/pihole-unbound/pihole/etc_pihole:/etc/pihole:rw
networks:
home:
ipv4_address: 192.168.1.5
restart: unless-stopped
privileged: true
unbound:
container_name: unbound
image: mvance/unbound-rpi:latest
hostname: syn-unbound
mac_address: d0:ca:ab:cd:ef:02
ports:
- 53/tcp
- 53/udp
networks:
home:
ipv4_address: 192.168.1.6
restart: unless-stopped
privileged: true
networks:
home:
driver: macvlan
driver_opts:
parent: eth0
ipam:
config:
- subnet: 192.168.1.0/24
gateway: 192.168.1.1
ip_range: 192.168.1.5/30
However, it is not blocking ads
I also had to choose the Respond only on interface eth0
option in the pihole's DNS settings.
By 'working' I'm guessing you mean you can view the pihole page when you go to http://192.168.1.5/admin
?
Are your devices set to use 192.168.1.5 as their DNS server?
Can you run dig pi-hole.net @192.168.1.5
and dig amazonco.uk @192.168.1.5
from your local network? The first should resolve correctly, and the second should be blocked on the default list, returning an answer of 0.0.0.0
Im not sure what is going on but when I run the compose file, it keep restarting pi-hole. I have setup the router to have a static IP using the mac address and i am able to ping it. However, I cannot open pihole and when i check the portainer container logs, it keeps restarting.
I tried this but didnt work: https://github.com/chriscrowe/docker-pihole-unbound/issues/26#issuecomment-782223951
Below is my docker-compose.yml:
This this log for portainer: