Gmail intermittently blocked

So I seem to be having an intermittent problem. Pi hole is configured as my one and only DNS option with google's DNS servers configured as server-level forwarders. Every so often, for hours at a time, gmail gets blocked.

Any browser on any device gives me a This site can’t be reached mail.google.com’s server DNS address could not be found. error. Mobile apps stop working and report cannot connect.

It seems to me, more like the pi hole cannot resolve gmail address, versus it is blocking it, as I'm not able to find any entries that are a smoking gun. The only google entries in the log are all obviously ad related.

After some hours, the issue always resolves itself.

A few things I've done to troubleshoot:

  • If changing DNS to a different (public) server, I am able to connect to gmail.
  • If disconnecting from the home network and connecting to other internet, I am able to connect to gmail.
  • I've added mail.google.com and accounts.google.com to my whitelist.
  • If I go to http://pi.hole/admin/queryads.php and query mail.google, the only result is for email-google.com
  • Rebooting the pi, or updating the lists, clearing browser cache, renewing IP address, or rebooting clients has no immediate effect.

thanks for you assistance

Debug Token:

auvuhkbww8

Looking through the debug log, I think this might be the problem:

Nov  6 05:49:14 dnsmasq[4397]: query[A] mail.google.com from 10.0.0.22
Nov  6 05:49:14 dnsmasq[4397]: cached mail.google.com is <CNAME>
Nov  6 05:49:14 dnsmasq[4397]: cached googlemail.l.google.com is NODATA-IPv4
Nov  6 05:49:14 dnsmasq[4397]: query[A] mail.google.com from 10.0.0.22
Nov  6 05:49:14 dnsmasq[4397]: cached mail.google.com is <CNAME>
Nov  6 05:49:14 dnsmasq[4397]: cached googlemail.l.google.com is NODATA-IPv4

although I'm not sure what to do about it. :-/

Try whitelisting ```google.com. and the country you are in.
If you are using (yacysearchengine) that may do it.
Untick (yacysearchengine) and (searchengine) lists if you are using them please.

Allow me to verify: I should whitelist "tilde tilde tilde dot google dot com dot us"?

Under settings I went to Pi Hole's blocklists but the ones you mention were not present. Here is what was there:

Lists used to generate Pi-hole's Gravity
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts

https://mirror1.malwaredomains.com/files/justdomains

http://sysctl.org/cameleon/hosts

https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt

https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt

https://hosts-file.net/ad_servers.txt

I do not know what happened last night but for some reason I found google . com blocked in many country's I did a few updates from the pihole and it was ok.

If you are in the USA .com is fine.

The 3 tilde characters are for formating in the forum, I am learning them.

so I've added google.com to the whitelist and the problem hasn't reoccurred. I'll continue to watch it but this probably fixed it.

kinda odd that no google.com entries appear in the log as having been blocked when the issue occurred, pihole simply couldn't resolve the domain name but no real explanation.

1 Like

I am seeing this, I have added google.com and mail.google.com to white list, and restarted my Pi-hole but still my apple devices are failing on any gmail based mail account.

I’m having the same issue. Seems to have started sometime last night as that’s when the mail stopped syncing on my iPhone. When I try to log into any other google app from my iPhone it says “Network Unavailable” citing an SSL error.

I’m gonna look at my pihole logs and see if there’s anything specific it looks like it’s blocking from my iPhone that could be causing this.

So my log stated it was blocking www.googleapis.com from my iPhone. I added this to the whitelist it didn’t seem to take, because apps didn’t work and the url continued to show up in my log as being blocked. I ran pihole -r from the command line on my pi and chose to repair. That seems to have fixed things as all the google apps on my iPhone now work.

Thanks.. Just checked and that is the same problem here...