Pihole is not blocking ads on my android phone

I am running PiHole on a raspberry pi 3 model b. The pi is wired with ethernet to my xfinity router and I managed to get pihole working perfectly on my windows 10 pc, no ads show up, however my android phone still shows ads when connected to wi-fi. I made sure 4g is off, I also changed the DNS settings manually in the wifi settings on the android phone, I installed the Network info II app and it confirms that my phone is in fact using the IP address of my pihole as the DNS and yet ads still show up. I have also cleared DNS cache in chrome via chrome://net-internals/#dns and disconnected/reconnected and yet I still receive ads. This is the debug log from running pihole -d:

pi@pi:~ $ pihole -d
This process collects information from your Pi-hole, and optionally uploads it to a unique and random directory on tricorder.pi-hole.net.

The intent of this script is to allow users to self-diagnose their installations.  This is accomplished by running tests against our software and providing the user with links to FAQ articles when a problem is detected.  Since we are a small team and Pi-hole has been growing steadily, it is our hope that this will help us spend more time on development.

NOTE: All log files auto-delete after 48 hours and ONLY the Pi-hole developers can access your data via the given token. We have taken these extra steps to secure your data and will work to further reduce any personal information gathered.

*** [ INITIALIZING ]
[i] 2018-01-01:14:45:35 debug log has been initiated.

*** [ INITIALIZING ] Sourcing setup variables
[i] Sourcing /etc/pihole/setupVars.conf...

*** [ DIAGNOSING ]: Core version
[i] Core: v3.2.1 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
[i] Branch: master
[i] Commit: v3.2.1-0-ge602008

*** [ DIAGNOSING ]: Web version
[i] Web: v3.2.1 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
[i] Branch: master
[i] Commit: v3.2.1-0-g31dddd8

*** [ DIAGNOSING ]: FTL version
[✓] FTL: v2.13.1

*** [ DIAGNOSING ]: dnsmasq version
[i] 2.76

*** [ DIAGNOSING ]: lighttpd version
[i] 1.4.45

*** [ DIAGNOSING ]: php version
[i] 7.0.19

*** [ DIAGNOSING ]: Operating system
[✓] Raspbian GNU/Linux 9 (stretch)

*** [ DIAGNOSING ]: SELinux
[i] SELinux not detected

*** [ DIAGNOSING ]: Processor
/opt/pihole/piholeDebug.sh: line 474: $'[\E[32m✓\E[0m] \E[32marmv7l\E[0m': command not found

*** [ DIAGNOSING ]: Networking
[✓] IPv4 address(es) bound to the eth0 interface:
   10.0.0.148/24 matches the IP found in /etc/pihole/setupVars.conf

[✓] IPv6 address(es) bound to the eth0 interface:
   2601:280:4400:60ce::8371 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)
   2601:280:4400:60ce:c915:734e:b487:5aa7 matches the IP found in /etc/pihole/setupVars.conf
   fe80::ec83:7866:6ca8:542 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)

   ^ 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.

[i] Default IPv4 gateway: 10.0.0.1
   * Pinging 10.0.0.1...
[✓] Gateway responded.
[i] Default IPv6 gateway: fe80::250:f1ff:fe80:0
   * Pinging fe80::250:f1ff:fe80:0...
[✓] Gateway responded.

*** [ DIAGNOSING ]: Ports in use
[22] is in use by sshd
[53] is in use by dnsmasq
[80] is in use by lighttpd
[4711] is in use by pihole-FTL

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✓] www4.efailf.us is 10.0.0.148 via localhost (127.0.0.1)
[✓] www4.efailf.us is 10.0.0.148 via Pi-hole (10.0.0.148)
[✓] doubleclick.com is 172.217.3.14 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
[✓] fbpageunblock.co.nf is 2601:280:4400:60ce:c915:734e:b487:5aa7 via localhost (::1)
[✓] fbpageunblock.co.nf is 2601:280:4400:60ce:c915:734e:b487:5aa7 via Pi-hole (2601:280:4400:60ce:c915:734e:b487:5aa7)
[✓] doubleclick.com is 2607:f8b0:400f:800::200e via a remote, public DNS server (2001:4860:4860::8888)

*** [ DIAGNOSING ]: Pi-hole processes
[✓] dnsmasq daemon is active
[✓] lighttpd daemon is active
[✓] pihole-FTL daemon is active

*** [ DIAGNOSING ]: Setup variables
    DHCP_START=10.0.0.2
    DHCP_END=10.0.0.253
    DHCP_ROUTER=10.0.0.1
    DHCP_LEASETIME=24
    PIHOLE_DOMAIN=local
    DHCP_IPv6=true
    PIHOLE_INTERFACE=eth0
    IPV4_ADDRESS=10.0.0.148/24
    IPV6_ADDRESS=2601:280:4400:60ce:c915:734e:b487:5aa7
    QUERY_LOGGING=true
    INSTALL_WEB=true
    LIGHTTPD_ENABLED=1
    DHCP_ACTIVE=false
    DNSMASQ_LISTENING=local
    PIHOLE_DNS_1=8.8.8.8
    PIHOLE_DNS_2=8.8.4.4
    PIHOLE_DNS_3=2001:4860:4860:0:0:0:0:8888
    PIHOLE_DNS_4=2001:4860:4860:0:0:0:0:8844
    PIHOLE_DNS_5=208.67.222.222
    PIHOLE_DNS_6=208.67.220.220
    PIHOLE_DNS_7=2620:0:ccc::2
    PIHOLE_DNS_8=2620:0:ccd::2
    DNS_FQDN_REQUIRED=true
    DNS_BOGUS_PRIV=true
    DNSSEC=false

*** [ DIAGNOSING ]: Dashboard and block page
[✓] X-Pi-hole: A black hole for Internet advertisements.
[✓] X-Pi-hole: The Pi-hole Web interface is working!

*** [ DIAGNOSING ]: Gravity list
-rw-r--r-- 1 root root 10250658 Jan  1 12:03 /etc/pihole/gravity.list
   -----head of gravity.list------
   10.0.0.148 0.0.0.0
   2601:280:4400:60ce:c915:734e:b487:5aa7 0.0.0.0
   10.0.0.148 0000mps.webpreview.dsl.net
   2601:280:4400:60ce:c915:734e:b487:5aa7 0000mps.webpreview.dsl.net

   -----tail of gravity.list------
   10.0.0.148 zzz.clickbank.net
   2601:280:4400:60ce:c915:734e:b487:5aa7 zzz.clickbank.net
   10.0.0.148 zz.zeroredirect1.com
   2601:280:4400:60ce:c915:734e:b487:5aa7 zz.zeroredirect1.com

*** [ DIAGNOSING ]: contents of /etc/pihole

-rw-r--r-- 1 root root 633 Dec 20 01:00 /etc/pihole/adlists.list
   https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
   https://mirror1.malwaredomains.com/files/justdomains
   http://sysctl.org/cameleon/hosts
   https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist
   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

-rw-r--r-- 1 root root 122 Jan  1 12:03 /etc/pihole/local.list
   10.0.0.148 pi
   2601:280:4400:60ce:c915:734e:b487:5aa7 pi
   10.0.0.148 pi.hole
   2601:280:4400:60ce:c915:734e:b487:5aa7 pi.hole

-rw-r--r-- 1 root root 234 Jan  1 12:03 /etc/pihole/logrotate
   /var/log/pihole.log {
        su root root
        daily
        copytruncate
        rotate 5
        compress
        delaycompress
        notifempty
        nomail
   }
   /var/log/pihole-FTL.log {
        su root root
        weekly
        copytruncate
        rotate 3
        compress
        delaycompress
        notifempty
        nomail
   }

-rw-r--r-- 1 root root 117 Dec 31 19:59 /etc/pihole/whitelist.txt
   raw.githubusercontent.com
   mirror1.malwaredomains.com
   sysctl.org
   zeustracker.abuse.ch
   s3.amazonaws.com
   hosts-file.net

*** [ DIAGNOSING ]: contents of /etc/dnsmasq.d

-rw-r--r-- 1 root root 1682 Jan  1 14:35 /etc/dnsmasq.d/01-pihole.conf
   addn-hosts=/etc/pihole/gravity.list
   addn-hosts=/etc/pihole/black.list
   addn-hosts=/etc/pihole/local.list
   localise-queries
   no-resolv
   cache-size=10000
   log-queries
   log-facility=/var/log/pihole.log
   local-ttl=2
   log-async
   server=8.8.8.8
   server=8.8.4.4
   server=2001:4860:4860:0:0:0:0:8888
   server=2001:4860:4860:0:0:0:0:8844
   server=208.67.222.222
   server=208.67.220.220
   server=2620:0:ccc::2
   server=2620:0:ccd::2
   domain-needed
   bogus-priv
   local-service

*** [ DIAGNOSING ]: contents of /etc/lighttpd

-rw-r--r-- 1 root root 3027 Jan  1 12:03 /etc/lighttpd/lighttpd.conf
   server.modules = (
        "mod_access",
        "mod_accesslog",
        "mod_auth",
        "mod_expire",
        "mod_compress",
        "mod_redirect",
        "mod_setenv",
        "mod_rewrite"
   )
   server.document-root        = "/var/www/html"
   server.error-handler-404    = "pihole/index.php"
   server.upload-dirs          = ( "/var/cache/lighttpd/uploads" )
   server.errorlog             = "/var/log/lighttpd/error.log"
   server.pid-file             = "/var/run/lighttpd.pid"
   server.username             = "www-data"
   server.groupname            = "www-data"
   server.port                 = 80
   accesslog.filename          = "/var/log/lighttpd/access.log"
   accesslog.format            = "%{%s}t|%V|%r|%s|%b"
   index-file.names            = ( "index.php", "index.html", "index.lighttpd.html" )
   url.access-deny             = ( "~", ".inc", ".md", ".yml", ".ini" )
   static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
   compress.cache-dir          = "/var/cache/lighttpd/compress/"
   compress.filetype           = ( "application/javascript", "text/css", "text/html", "text/plain" )
   include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
   include_shell "/usr/share/lighttpd/create-mime.assign.pl"
   include_shell "find /etc/lighttpd/conf-enabled -name '*.conf' -a ! -name 'letsencrypt.conf' -printf 'include \"%p\"
' 2>/dev/null"
   $HTTP["url"] =~ "^/admin/" {

       setenv.add-response-header = (
           "X-Pi-hole" => "The Pi-hole Web interface is working!",
           "X-Frame-Options" => "DENY"
       )
       $HTTP["url"] =~ ".ttf$" {

           setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
       }
   }
   $HTTP["url"] =~ "^/admin/\.(.*)" {
        url.access-deny = ("")
   }
   include_shell "cat external.conf 2>/dev/null"

*** [ DIAGNOSING ]: contents of /etc/cron.d

-rw-r--r-- 1 root root 1629 Jan  1 12:03 /etc/cron.d/pihole
   7 3   * * 7   root    PATH="$PATH:/usr/local/bin/" pihole updateGravity
   00 00   * * *   root    PATH="$PATH:/usr/local/bin/" pihole flush once quiet
   @reboot root /usr/sbin/logrotate /etc/pihole/logrotate
   */10 *  * * *   root    PATH="$PATH:/usr/local/bin/" pihole updatechecker local
   55 17  * * *   root    PATH="$PATH:/usr/local/bin/" pihole updatechecker remote
   @reboot root    PATH="$PATH:/usr/local/bin/" pihole updatechecker remote reboot

*** [ DIAGNOSING ]: contents of /var/log/lighttpd

-rw-r--r-- 1 www-data www-data 1666 Jan  1 13:25 /var/log/lighttpd/error.log
   2018-01-01 06:25:02: (server.c.1534) logfiles cycled UID = 0 PID = 11919
   2018-01-01 12:03:12: (server.c.1828) server stopped by UID = 0 PID = 1
   2018-01-01 12:03:30: (log.c.217) server started
   2018-01-01 12:03:30: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
   2018-01-01 12:04:50: (server.c.1828) server stopped by UID = 0 PID = 1
   2018-01-01 12:05:00: (log.c.217) server started
   2018-01-01 12:05:00: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
   2018-01-01 12:25:26: (server.c.1828) server stopped by UID = 0 PID = 1
   2018-01-01 12:25:33: (log.c.217) server started
   2018-01-01 12:25:33: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
   2018-01-01 12:51:16: (server.c.1828) server stopped by UID = 0 PID = 1
   2018-01-01 12:51:27: (log.c.217) server started
   2018-01-01 12:51:27: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
   2018-01-01 13:00:08: (log.c.217) server started
   2018-01-01 13:00:08: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
   2018-01-01 13:08:46: (server.c.1828) server stopped by UID = 0 PID = 1
   2018-01-01 13:09:11: (log.c.217) server started
   2018-01-01 13:09:11: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
   2018-01-01 13:21:30: (server.c.1828) server stopped by UID = 0 PID = 1
   2018-01-01 13:21:38: (log.c.217) server started
   2018-01-01 13:21:38: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
   2018-01-01 13:25:46: (server.c.1828) server stopped by UID = 0 PID = 1
   2018-01-01 13:25:52: (log.c.217) server started
   2018-01-01 13:25:52: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)

*** [ DIAGNOSING ]: contents of /var/log

-rw-r--r-- 1 pihole pihole 75947 Jan  1 14:45 /var/log/pihole-FTL.log
   [2018-01-01 00:00:02.050] NOTICE: pihole.log has been flushed
   [2018-01-01 00:00:02.051]   Resetting internal data structure
   [2018-01-01 00:00:02.051]   Queries in memory before flushing: 11476
   [2018-01-01 00:00:02.257] Gravity list entries: 107129
   [2018-01-01 00:00:02.257] No blacklist present
   [2018-01-01 00:00:02.257] No wildcard blocking list present
   [2018-01-01 00:00:02.257] Reading from /var/log/pihole.log.1 (rw-r--r--)
   [2018-01-01 00:00:02.257] Notice: Increasing forwarded struct size from 0 to 4 (464.00 B)
   [2018-01-01 00:00:02.299] New forward server: 8.8.4.4 google-public-dns-b.google.com (0/4)
   [2018-01-01 00:00:02.299] Notice: Increasing overTime struct size from 0 to 100 (4.50 KB)
   [2018-01-01 00:00:02.299] Notice: Increasing queries struct size from 0 to 10000 (324.51 KB)
   [2018-01-01 00:00:02.299] Notice: Increasing domains struct size from 0 to 1000 (344.51 KB)
   [2018-01-01 00:00:02.299] Notice: Increasing clients struct size from 0 to 10 (344.68 KB)
   [2018-01-01 00:00:02.306] New client: 2601:280:4400:60ce:dcb0:52ff:7d5d:6250 (0/10)
   [2018-01-01 00:00:02.331] New forward server: 8.8.8.8 google-public-dns-a.google.com (1/4)
   [2018-01-01 00:00:02.338] New client: 10.0.0.232 oa.local (1/10)
   [2018-01-01 00:00:02.340] New client: 127.0.0.1 localhost (2/10)
   [2018-01-01 00:00:02.783] New client: 10.0.0.114 (3/10)
   [2018-01-01 00:00:02.847] New client: 2601:280:4400:60ce::22ce (4/10)
   [2018-01-01 00:00:02.856] New client: 10.0.0.168 retropie.local (5/10)
   [2018-01-01 00:00:02.907] Notice: Increasing overTime struct size from 100 to 200 (353.98 KB)
   [2018-01-01 00:00:03.124] New client: 2601:280:4400:60ce:1115:2697:34d8:fa57 (6/10)
   [2018-01-01 00:00:03.200] New client: 2601:280:4400:60ce::7680 (7/10)
   [2018-01-01 00:00:03.214] New client: 10.0.0.163 chromecast.local (8/10)
   [2018-01-01 00:00:03.222] New client: 2601:280:4400:60ce:8959:444d:8a89:508d (9/10)

*** [ DIAGNOSING ]: Pi-hole log
-rw-r--r-- 1 dnsmasq root 12379711 Jan  1 14:45 /var/log/pihole.log
   -----head of pihole.log------
   Jan  1 00:00:02 dnsmasq[562]: query[PTR] 4.4.8.8.in-addr.arpa from 127.0.0.1
   Jan  1 00:00:02 dnsmasq[562]: forwarded 4.4.8.8.in-addr.arpa to 8.8.4.4
   Jan  1 00:00:02 dnsmasq[562]: forwarded 4.4.8.8.in-addr.arpa to 8.8.8.8
   Jan  1 00:00:02 dnsmasq[562]: reply 8.8.4.4 is google-public-dns-b.google.com
   Jan  1 00:00:02 dnsmasq[562]: query[PTR] 0.5.2.6.d.5.d.7.f.f.2.5.0.b.c.d.e.c.0.6.0.0.4.4.0.8.2.0.1.0.6.2.ip6.arpa from 127.0.0.1
   Jan  1 00:00:02 dnsmasq[562]: cached 2601:280:4400:60ce:dcb0:52ff:7d5d:6250 is NXDOMAIN
   Jan  1 00:00:02 dnsmasq[562]: query[PTR] 8.8.8.8.in-addr.arpa from 127.0.0.1
   Jan  1 00:00:02 dnsmasq[562]: forwarded 8.8.8.8.in-addr.arpa to 8.8.4.4
   Jan  1 00:00:02 dnsmasq[562]: reply 8.8.8.8 is google-public-dns-a.google.com
   Jan  1 00:00:02 dnsmasq[562]: query[PTR] 232.0.0.10.in-addr.arpa from 127.0.0.1
   Jan  1 00:00:02 dnsmasq[562]: DHCP 10.0.0.232 is OA.local
   Jan  1 00:00:02 dnsmasq[562]: query[PTR] 114.0.0.10.in-addr.arpa from 127.0.0.1
   Jan  1 00:00:02 dnsmasq[562]: forwarded 114.0.0.10.in-addr.arpa to 8.8.4.4
   Jan  1 00:00:02 dnsmasq[562]: query[PTR] e.c.2.2.0.0.0.0.0.0.0.0.0.0.0.0.e.c.0.6.0.0.4.4.0.8.2.0.1.0.6.2.ip6.arpa from 127.0.0.1
   Jan  1 00:00:02 dnsmasq[562]: cached 2601:280:4400:60ce::22ce is NXDOMAIN
   Jan  1 00:00:02 dnsmasq[562]: query[PTR] 168.0.0.10.in-addr.arpa from 127.0.0.1
   Jan  1 00:00:02 dnsmasq[562]: DHCP 10.0.0.168 is retropie.local
   Jan  1 00:00:03 dnsmasq[562]: query[PTR] 7.5.a.f.8.d.4.3.7.9.6.2.5.1.1.1.e.c.0.6.0.0.4.4.0.8.2.0.1.0.6.2.ip6.arpa from 127.0.0.1
   Jan  1 00:00:03 dnsmasq[562]: cached 2601:280:4400:60ce:1115:2697:34d8:fa57 is NXDOMAIN
   Jan  1 00:00:03 dnsmasq[562]: query[PTR] 0.8.6.7.0.0.0.0.0.0.0.0.0.0.0.0.e.c.0.6.0.0.4.4.0.8.2.0.1.0.6.2.ip6.arpa from 127.0.0.1


********************************************
********************************************
[✓] ** FINISHED DEBUGGING! **

    * The debug log can be uploaded to tricorder.pi-hole.net for sharing with developers only.
    * For more information, see: https://pi-hole.net/2016/11/07/crack-our-medical-tricorder-win-a-raspberry-pi-3/
    * If available, we'll use openssl to upload the log, otherwise it will fall back to netcat.

[?] Would you like to upload the log? [y/N]
This process collects information from your Pi-hole, and optionally uploads it to a unique and random directory on tricorder.pi-hole.net.

Try disabling DHCP on your router and enable it in the Pi-hole (via the web interface)

I cannot. I I’m using an Xfinity router provided by them and all the DHCP settings are blocked out with the exception of the final digit in the range for the IP addresses. It will not allow me to disable DHCP at all in order for me to use the pihole DHCP. I also tried setting the range of the IP addresses in the DHCP to start and end at the same number as the IP address of my pi and then set the lease to Forever and it still didn’t work. The craziest thing is that from all the reading I’ve done on this topic everyone says to download Network info II and it will tell you if your Android is actually using the DNS of your pie and everyone that downloaded it that was having this problem said that in fact there Android was not using the DNS of the pi even when they set it manually. Whenever they finally managed to, in whatever way they did individually, fix their DNS on the phone and Network Info II shows the pi dns, it worked for them and discussion closed, but in my Network Info II app it actually does show that the DNS is set to the IP address of my pi. I feel stuck. If I connect to openvpn then Chrome ads are blocked but the internal web browser in the apps like Facebook and Gmail still show ads and again I have to be connected to openvpn in order for it to even work at home while I’m connected to Wi-Fi, while my PC is not connected to openVPN and yet ads are blocked perfectly.

Thank you for your reply by the way. First ever forum post in any site! Wooo!

Maybe your router is sending out an IP6v DNS server which is used by your Android phone. Most apps still carelessly lack any IPv6 details and hence that can easily go unnoticed (unfortunately, I cannot suggest a good app for this purpose).

Maybe you can contact their support and ask them to do that for you. We had some users (maybe with other ISPs, not sure) that were successful with asking for help from their providers. A big :+1: from me for that.

Well done :slight_smile:

Ah, do you see any Queries from the Android phone coming up on the dashboard? If not, then they the Android phone is surely using another DNS server (it might have gotten from its IPv6 configuration).

I found the problem was with an Android advanced network setting “Private DNS” being set to “Automatic” (or perhaps set to a specific provider, if anyone set theirs up and forgot about it) instead of “Off” which appears to result in Android not verifying my DNS server (my Pi-Hole) as a secure DNS and most likely reverting back to Google’s own secure DNS.

Details on Reddit:

https://www.reddit.com/r/pihole/comments/aco8iu/later_model_andriod_devices_not_working_with/

2 Likes

9 posts were split to a new topic: Ads not blocked on iPhone