Please follow the below template, it will help us to help you!
Expected Behaviour:
If I do a ping google.com I expect to get a response.
If I do a ping 172.217.2.238 (which is what nslookup google.com gives me) I expect to get a response.
Actual Behaviour:
When using the domain name in a ping I get no response. I just have to cancel it out.
When I use the IP Address it works perfectly.
From what device are you running these commands - from the Pi Linux terminal, or from a connected client? From the Pi, what is the output of dig google.com
Your debug log shows that Pi-Hole is running properly and resolving DNS queries:
*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✓] denisaslan97.000webhostapp.com is 0.0.0.0 via localhost (127.0.0.1)
[✓] denisaslan97.000webhostapp.com is 0.0.0.0 via Pi-hole (192.168.1.107)
[✓] doubleclick.com is 172.217.1.142 via a remote, public DNS server (8.8.8.8)
[2019-06-21 18:34:19.875 1998] Imported 25697 queries from the long-term database
[2019-06-21 18:34:19.876 1998] -> Total DNS queries: 25697
[2019-06-21 18:34:19.876 1998] -> Cached DNS queries: 3382
[2019-06-21 18:34:19.876 1998] -> Forwarded DNS queries: 15499
[2019-06-21 18:34:19.876 1998] -> Exactly blocked DNS queries: 6816
[2019-06-21 18:34:19.876 1998] -> Unknown DNS queries: 0
[2019-06-21 18:34:19.876 1998] -> Unique domains: 1957
[2019-06-21 18:34:19.876 1998] -> Unique clients: 7
[2019-06-21 18:34:19.876 1998] -> Known forward destinations: 4
And you're right, everything seems to be working fine except this particular issue. The reason I'm concerned is doing a sudo apt-get update takes FOREVER and I think it may be related to not being able to resolve a host name from the terminal.
The dig output shows that you can resolve a hostname in the terminal. The dig went from the Pi, to Pi-Hole, to the Pi-Hole upstream resolver and back to the Pi terminal, and provided the IP of the requested domain.
That is odd. I'm not a ping expert, but the output on my Pi is different than yours. Your's appears to be looking for the IPv6 address, not the IPv4. Here is my output for the same ping:
ping -c5 google.com
PING google.com (172.217.4.78) 56(84) bytes of data.
64 bytes from lga15s47-in-f78.1e100.net (172.217.4.78): icmp_seq=1 ttl=252 time=20.3 ms
64 bytes from lga15s47-in-f78.1e100.net (172.217.4.78): icmp_seq=2 ttl=252 time=24.9 ms
64 bytes from lga15s47-in-f78.1e100.net (172.217.4.78): icmp_seq=3 ttl=252 time=21.1 ms
64 bytes from lga15s47-in-f78.1e100.net (172.217.4.78): icmp_seq=4 ttl=252 time=18.4 ms
64 bytes from lga15s47-in-f78.1e100.net (172.217.4.78): icmp_seq=5 ttl=252 time=25.9 ms
--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4003ms
rtt min/avg/max/mdev = 18.446/22.154/25.952/2.831 ms
Well that worked like a charm! So I was wondering if there was something wrong with IPv6 based on the output of the diagnostic run, specifically the 2 sections:
1st -
*** [ DIAGNOSING ]: Networking
[✓] IPv4 address(es) bound to the eth0 interface:
192.168.1.107/24 matches the IP found in /etc/pihole/setupVars.conf
[✓] IPv6 address(es) bound to the eth0 interface:
2605:6000:1000:452:7047:5f5d:183c:cf4 does not match the IP found in /etc/pihole/setupVars.conf (Use IPv6 ULA addresses for Pi-hole)
fe80::404f:bc8f:6793:38f does not match the IP found in /etc/pihole/setupVars.conf (Use IPv6 ULA addresses for Pi-hole)
^ Please note that you may have more than one IP address listed.
As long as one of them is green, and it matches what is in /etc/pihole/setupVars.conf, there is no need for concern.
The link to the FAQ is for an issue that sometimes occurs when the IPv6 address changes, which is why we check for it.
And the second section shows again IPv4 works but IPv6 has some issue
2nd -
*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✓] crystalxxxmovies.com is 0.0.0.0 via localhost (127.0.0.1)
[✓] crystalxxxmovies.com is 0.0.0.0 via Pi-hole (192.168.1.107)
[✓] doubleclick.com is 216.58.194.46 via a remote, public DNS server (8.8.8.8)
*** [ DIAGNOSING ]: Name resolution (IPv6) using a random blocked domain and a known ad-serving domain
[✓] www.cam4.fr is :: via localhost (::1)
[✗] Failed to resolve www.cam4.fr via Pi-hole (2605:6000:1000:452:b02a:25c1:ef1d:26d0)
[✗] Failed to resolve doubleclick.com via a remote, public DNS server (2001:4860:4860::8888)
So not sure what's wrong with my IPv6 resolving but I think that's the root of it all.