Hello,
I have trouble making my pi-hole work, it is kinda working receiving and blocking some querry but i cannot update gravity list, when i try via the web interface or via SSH (pihole -g) i get this error:
root@DietPi:~# pihole -g
[✗] DNS resolution is currently unavailable
[✗] DNS resolution is not available
I checked all topic and tried to change withsudo nano /etc/resolv.conf
to nameserver 192.168.2.5
and nameserver 127.0.0.1
and google DNS nameserver 8.8.8.8
...nothing seems to work.
*** [ DIAGNOSING ]: SELinux
[i] SELinux not detected
*** [ DIAGNOSING ]: FirewallD
[i] Firewalld service inactive
*** [ DIAGNOSING ]: Operating system
[i] dig return code: 10
[i] dig response: dig: couldn't get address for 'ns1.pi-hole.net': failure
[✗] Distro: Debian
[✗] Error: Debian is not a supported distro (https://docs.pi-hole.net/main/prerequisites/)
** [ DIAGNOSING ]: Networking
[✓] IPv4 address(es) bound to the eth0 interface:
192.168.2.5/24 matches the IP found in /etc/pihole/setupVars.conf
[i] Default IPv4 gateway: 192.168.2.1
*** Pinging 192.168.2.1...**
**[✗] Gateway did not respond. (https://discourse.pi-hole.net/t/why-is-a-default-gateway-important-for-pi-hole/3546)**
*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✓] ch-wf.taboola.com is 0.0.0.0 via localhost (127.0.0.1)
[✓] ch-wf.taboola.com is 0.0.0.0 via Pi-hole (192.168.2.5)
**[✗] Failed to resolve doubleclick.com 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
* Received 341 bytes from eth0:192.168.2.1
Offered IP address: *** [ DIAGNOSING ]: SELinux
[i] SELinux not detected
*** [ DIAGNOSING ]: FirewallD
[i] Firewalld service inactive192.168.2.69
Server IP address: N/A
Relay-agent IP address: N/A
BOOTP server: (empty)
BOOTP file: (empty)
DHCP options:
Message type: DHCPOFFER (2)
server-identifier: 192.168.2.1
lease-time: 259200 ( 3d )
netmask: 255.255.255.0
router: 192.168.2.1
dns-server: 192.168.2.1
dns-server: 192.168.2.5
renewal-time: 129600 ( 1d 12h )
rebinding-time: 226800 ( 2d 15h )
broadcast: 192.168.2.255
domain-name: "home"
--- end of options ---
DHCP packets received on interface lo: 0
DHCP packets received on interface eth0: 1
Jul 26 17:17:10 dnsmasq[381]: query[A] discourse.pi-hole.net from 192.168.2.10
Jul 26 17:17:10 dnsmasq[381]: forwarded discourse.pi-hole.net to 8.8.4.4
Jul 26 17:17:10 dnsmasq[381]: forwarded discourse.pi-hole.net to 8.8.8.8
You have some network connectivity issues. Your Pi-hole does receive queries from other clients and forwards them but does not get an answer from your upstream DNS servers (like 8.8.8.8).
Do you have any firewall in place? Is something preventing your pi device from sending queries on port 53 to the internet?
And, just to rule it out, a HTTP connection does not work either, does it?
curl -IL 192.168.2.1
How did you apply 192.168.2.5 first, only and initially as static IP on DietPi or did you set this actively in the router as well? Probably it works when you actively set this as reserved IP in the router settings. Or, as it is not withing the DHCP range, give it a reserved IP within the DHCP range and switch back to DHCP on DietPi temporarily. If it works, then assign that reserved IP as static IP.
If it still does not work (ping or curl the router), then at best reapply the settings and dietpi-config and reboot.
Else it must be blocked at the router, which probably does not route any packets from clients outside the DHCP range, and I suggest to try what I wrote above: Use DHCP but assign a reserved IP for that device inside the router settings, so that the IP does not change. That IP can then be assigned as static IP on DietPi as well.
So i changed the dietpi to DHCP, then my router gave me the ip 192.168.2.68, i then went in my router and reserved the ip 192.168.2.15 (which is inside my DHCP range)
I had to reboot the pi/router for my pi to show up
i then went in the DNS page of my router to set it to 192.168.2.15
i connected via SSH and did ping 192.168.2.1 and i get the same result
root@DietPi:~# ping 192.168.2.1
PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.
From 192.168.2.15 icmp_seq=21 Destination Host Unreachable
From 192.168.2.15 icmp_seq=22 Destination Host Unreachable
From 192.168.2.15 icmp_seq=23 Destination Host Unreachable
root@DietPi:~# curl -IL 192.168.2.1
curl: (7) Failed to connect to 192.168.2.1 port 80: No route to host
root@DietPi:~# ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether b8:27:eb:fa:be:aa brd ff:ff:ff:ff:ff:ff
root@DietPi:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:fa:be:aa brd ff:ff:ff:ff:ff:ff
inet 192.168.2.15/24 brd 192.168.2.255 scope global eth0
valid_lft forever preferred_lft forever
root@DietPi:~# ip r
default via 192.168.2.1 dev eth0 onlink
192.168.2.0/24 dev eth0 proto kernel scope link src 192.168.2.15