Upgraded to v5.2.4, issues seemed to have started after this.
Fedora client with a fixed IP address and manual DNS set to pi-hole.
Pi-hole is a raspberry pi system again with a static IP, OS is up-to-date.
My client now looses connection from pi-hole after a period of time, result...
No DNS resolution, no access to web via browser.
I can access the Internet through the router, i.e., I can ping 4.2.2.1, but I cannot ping google.ca because no DNS.
I cannot ping pihole.
I can reestablish the connection if I ping the Fedora client from pihole...and thus DNS starts working.
This also now happens to my iPhone SE2 after I leave home (again DNS is manually set to pihole). |Again, the only way to re-establish connection is to ping the iPhone's ip from pihole.
So, the problem is not OS-specific. The problem appears to be on the pi-hole. Also, my router is an ASUS AX88U on which I upgraded the firmware, on the same day, breaking the cardinal rule of not making more than one system change at a time.
You have a configuration problem. Your wlan0 interface has a different IP (and on a completely different range) than the IP for which you have configured Pi-hole.
*** [ DIAGNOSING ]: Networking
[✓] IPv4 address(es) bound to the wlan0 interface:
192.168.50.60/24 does not match the IP found in /etc/pihole/setupVars.conf (https://discourse.pi-hole.net/t/use-ipv6-ula-addresses-for-pi-hole/2127)
*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✓] rtb.gumgum.com is 0.0.0.0 via localhost (127.0.0.1)
[✗] Failed to resolve rtb.gumgum.com via Pi-hole (10.0.1.60)
[✓] doubleclick.com is 172.217.3.174 via a remote, public DNS server (8.8.8.8)
*** [ DIAGNOSING ]: Discovering active DHCP servers (takes 10 seconds)
Scanning all your interfaces for DHCP servers
Timeout: 10 seconds
DHCP packets received on interface lo: 0
DHCP packets received on interface eth0: 0
DHCP packets received on interface wlan0: 0
*** [ DIAGNOSING ]: Setup variables
BLOCKING_ENABLED=true
DNSMASQ_LISTENING=single
DNS_FQDN_REQUIRED=true
DNS_BOGUS_PRIV=true
DNSSEC=false
CONDITIONAL_FORWARDING=false
PIHOLE_INTERFACE=wlan0
IPV4_ADDRESS=10.0.1.60/24
Run pihole -r and select reconfigure to align Pi-hole with the correct interface and IP. Note, run a teleporter export first to save your adlists for later re-import.
I backed up the config, ran the reconfiguration command, and rebooted pihole.
Thank you for your help. The error in my configuration was due to adding the ASUS RT-AX88U to my network about three months ago. Prior to that I was running with just the cable modem's firewall with the internal address scope 10.0.1.0/24. I configured the ASUS with an internal scope of 192.168.50.0/24 just in case I had issues with the ASUS and had to fall back to just using the modem.
I am surprised/pleased that pihole basically kept on operating well even though it was not configured correctly after the hardware transition.
Just one other question...I may have complicated things further. During the reconfiguration (pihole -r), I chose not to reconfigure the ipv6 interface. Will that be an issue? Should I run 'iphole -r' again?
Went to bed and issue re-appeared in the morning. Re-ran the 'pi-hole -r' command and everything seems to check out. Here is the contents of /etc/pihole/setupVars.conf' which appears correct...
I use cira.ca DNS servers. I checked /etc/dhcpcd.conf where I statically set the ip address for the pi-hole server...note, I commented out the old IP settings.
I am really stumped on this one. Why is there an issue with only two systems loosing connection to pihole, my Fedora system and my iPhone SE2? The Fedora's IP info is set statically, the iPhone's ip info is dynamic except, of course, DNS which is set manually to 192.168.50.60. The folowing systems have no issues: two ipads, another iPhone, a Windows PC, a printer, and several devices like Apple TVs.
The DHCP server is the ASUS router. ipv6 is not enabled on this router/server just ipv4.
Okay, so this means your Pi-hole does not crash but looses connectivity somehow. We should first look for further details before we can suggest what you can do to fix this.
"I cannot ping pihole" Only via hostname or also not via IP address?
How do you connect to your Pi-hole after the connection is dead from Fedora? (do you have a screen connected)?
Can you still ping/reach the Pi-hole for other devices while the connection to Fedora is dead?
The only interesting bit in your debug log seems to be
Jan 31 00:00:02 dnsmasq[593]: query[PTR] 30.122.112.149.in-addr.arpa from 127.0.0.1
Jan 31 00:00:02 dnsmasq[593]: forwarded 30.122.112.149.in-addr.arpa to 149.112.122.30
Jan 31 00:00:02 dnsmasq[593]: forwarded 30.122.112.149.in-addr.arpa to 149.112.121.30
Jan 31 00:00:02 dnsmasq[593]: reply error is SERVFAIL
which means CIRA Canadian Shield refuses to resolve its own address to a valid hostname. But that won't matter.
I only use pi-hole's ip address, 192.168.50.60, not its dnsname.
I have my Raspberry pi device (pi-hole host) connected to a moniter/kb/mouse so I have direct access.
3.That's the odd thing, none of the other network devices loose their connection when the Fedora system and iPhone loose connection.
Cira may be blocking DNS name resolution of its own servers?
Last night, I set up two 30 second interval pings (using IP addresses only) to test if I could keep the connection up. From the Rapi system, I set up a ping to my iphone. From the Fedora system, I set up a ping to the Rapi system. I wanted to see whether it would matter which system was the ping source. It did not matter, both the Fedora system and the iPhone maintained their connection to the Rapi host and thus to pi-hole.
The connection to pihole stays up (from the two problematic clients) when I run the interval pings to/from pihole. I have dns resolution.
If I do not run the interval pings to/from pihole, the connection drops (on the two problematic clients). I do not have dns resolution. At that point, if I try to ping pihole from the clients, there is no response.
After some thought, I decided to take a Windows 10 laptop and partition the drive and install Fedora 33 on the new partition for a dual boot system.
I wanted to see how a new system would work with pihole. So far, no issues.
That led me to conclude that there must be some wonky DNS caching issue or a mac-address-table issue going on with pihole or the Raspberry Pi. What is strange however, AFAIK, RPi by default does not cache DNS entries.
So, I changed the static IP addresses of my original Fedora laptop and the iPhone. About 8 hours later, each system has kept its connection alive to pihole...without interval pings running.
So, I guess that was the issue: a wonky DNS caching or mac-address-table issue. All seems good now.
Okay, so that makes much more sense. I doubt a DNS caching can be responsible here, it wouldn't know about your ping workaround. An ARP issue seems a bit more likely, however, it still looks odd. More likely would be an (unintentionally) double static IP address on your network.
After having set up a lot of different networks in my life, I came to the conclusion that static addresses are something you really want to avoid. You only need them for the router and DNS servers. Believe me, everything else should use dynamic IP addresses and use DNS instead of IP addresses