The issue I am facing:
If I want to use Pihole I have to use the built-in DCHP because my router does not allow me to set DNS servers. And it works fine... until the router is restarted or sometimes randomly(maybe when leases expire?). When that happens in most cases I lose internet connection, I still have access to the local network and can ping/ssh my PIs but not outside connection.
Also even when I have internet services behind Caddy reverse proxy + cloudflare are unreachable, no hits on caddy logs. Services using cloudflare tunneling work fine.
Other rare cases:
Internet / No local network
I can access the Internet but not the local network, all devices can access the Internet. In some cases, I noticed that no ipv4 IP was assigned to any of the devices even if my laptop and 2 PIs have static IPs, instead, they all had only ipv6 IPs. Could not even access the router.
No Internet / Partial local network?
Similar with the issue above however, at that time my Laptop did not have a static ip just had a ipv6 ip and was completely locked out of the network while the PI's had an ipv4 and could ping each other.
Things I tried:
Enabled ipv6 in pihole, upstream servers : unbound recursive, google & quad9 with and w/o ipv6, restarting dns server after router reboot, flushing network table, reload config.
Anything I could think of and I could find on google.
I have been at this for 2 days now, pressed every button and ticked every box nothing seems to fix it.
I have also tried Adguard and have the same issue both with docker and w/o docker install.
Details about my system:
Using a PiZero 2 W
Static IP set to 192.168.8.2
Gateway 192.168.8.1
Debug log (in docker): https://tricorder.pi-hole.net/J4ETo0e7/
Debug log for fresh regular install:
https://tricorder.pi-hole.net/mD4ikl5q/
Docker compose:
version: "3"
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
network_mode: host
environment:
TZ: 'Europe/London'
WEBPASSWORD: '****'
FTLCONF_DELAY_STARTUP: 5 # to fix interface does not exist
# Volumes store your data between container upgrades
volumes:
- './etc-pihole:/etc/pihole'
- './etc-dnsmasq.d:/etc/dnsmasq.d'
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
cap_add:
- NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed
restart: unless-stopped
dhcpcd.conf: (tried different name servers as 192.168.8.2 and just 1.1.1.1 and other combinations same results)
interface wlan0
static ip_address=192.168.8.2/24
static routers=192.168.8.1
static domain_name_servers=127.0.0.1 1.1.1.1
resolv.conf (edited before and tried different nameservers, 1.1.1.1, 192.168.8.2, ipv6 and some other things i could find on google)
# Generated by resolvconf
nameserver 127.0.0.1
resolvconf.conf (followed instructions for installing unbound from documentation)
# Configuration for resolvconf(8)
# See resolvconf.conf(5) for details
resolv_conf=/etc/resolv.conf
# If you run a local name server, you should uncomment the below line and
# configure your subscribers configuration files below.
#name_servers=127.0.0.1
# Mirror the Debian package defaults for the below resolvers
# so that resolvconf integrates seemlessly.
dnsmasq_resolv=/var/run/dnsmasq/resolv.conf
pdnsd_conf=/etc/pdnsd.conf
#unbound_conf=/etc/unbound/unbound.conf.d/resolvconf_resolvers.conf
Probably not relevant but unbound compose:
version: '3'
services:
unbound:
container_name: unbound
image: "mvance/unbound-rpi:latest"
expose:
- "5334"
ports:
- 5334:53/tcp
- 5334:53/udp
volumes:
- /home/nepherius/configs/unbound.conf:/opt/unbound/etc/unbound/unbound.conf
restart: unless-stopped
and a paste of ifconfig (router as DHCP)
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.8.2 netmask 255.255.255.0 broadcast 192.168.8.255
inet6 2a04:xxxxxxxfd8:496e:2 prefixlen 128 scopeid 0x0<global>
inet6 fd88:36cf:xxxxxxx:ac73:d00c:ec6f prefixlen 64 scopeid 0x0<global>
inet6 2a04:xxxxx:ec9d:743e:a26f prefixlen 64 scopeid 0x0<global>
inet6 fe80::3xxx:6cd5:e8a7 prefixlen 64 scopeid 0x20<link>
ether d8:3a:dd:78:43:d5 txqueuelen 1000 (Ethernet)
RX packets 21835 bytes 5640840 (5.3 MiB)
RX errors 0 dropped 1 overruns 0 frame 0
TX packets 16780 bytes 9493287 (9.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
What I have changed since installing Pi-hole:
I moved pihole to docker & added unbound
Edit: Added debug log for fresh install