My PiHole (hosted on Orange Pi 5) loses internet connection when I turn off the DHCP on the router and turn on the DHCP on the PiHole. This doesn't happen immediately and I can see that the DHCP is working for connecting devices, but within an hour or so the PiHole will lose connection to the internet and thus all devices on the network also lose access. If I go back to the router and turn on the DHCP then internet comes back on.
I installed PiHole following this tutorial:
Here is my docker-compose.yml:
GNU nano 6.2 docker-compose.yml services:
pihole:
container_name: pihole
image: pihole/pihole:latest
network_mode: host
environment:
TZ: 'Europe/Berlin'
WEBPASSWORD: 'xxxxxxxxx'
PIHOLE_ADLISTS: 'https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts,https://mirror1.malwaredomains.>
FTLCONF_REPLY_ADDR4: "192.168.0.31"
volumes:
- './etc-pihole:/etc/pihole'
- './etc-dnsmasq.d:/etc/dnsmasq.d'
cap_add:
- NET_ADMIN
restart: unless-stopped
I also assigned static IP address to the Pihole device by editing file @ /etc/network/interfaces:
GNU nano 6.2 /etc/network/interfaces source /etc/network/interfaces.d/*
# Network is managed by Network manager
auto lo
iface lo inet loopback
# PRIMARY network interface
auto eth0
iface eth0 inet static
address 192.168.0.31
netmask 255.255.255.0
gateway 192.168.0.1
Screenshots from Router page and Pihole (ignore enable/disable):
I suspect that the PiHole device is unable to get an IP address from the DHCP :/.
Please can someone help me