My solution for slow page loading with Fritz!Box 7490

Hi all,

I started using pi-hole two days ago. I also ran into the often discussed "slow webpage loading" issue, but nothing of the info I found online really solved all of my problems. Therefore I want to share my findings with you.

My setup is as follows:

  • Raspberry Pi Model B Rev 1.1
    • Raspbian 04/2018
    • pi-hole v3.3.1, Web Interface v3.3, FTL v3.0
  • AVM Fritz!Box 7490
    • Fritz!OS 06.93
  • ISP: O2 Germany (Telefonica)
  • Doesn't provide IPv6 addresses and routing

First I had to fix the issue that IPv6 blocking was not set-up after the pi-hole installation. After adding the Raspi's IPv6 address to /etc/pihole/setupVars.config and rerunning the pi-hole configuration, the IPv6 blocking was enabled.

I also added AAAA_QUERY_ANALYSIS=no to /etc/pihole/pihole-FTL.conf, but frankly I don't know if this aktually solved anything.

The main problem after the general set-up was that sites were loading very slow either on my Windows Notebook or my Samsung Galaxy S8 / iPhone 6S or both. The article https://pi-hole.net/2018/02/02/why-some-pages-load-slow-when-using-pi-hole-and-how-to-fix-it/ only partially helped since iptables are not part of Raspbian Stretch anymore and I didn't want to dig into nftables.

The trick was the Fritz!Box configuration. I made the following changes:

  1. Internet -> Account Information ->IPv6: Enable IPv6

  2. Internet -> Account Information -> DNS-Server: Enter IPv4-address of the Raspi as primary and secondary DNS

  3. Home Network -> Network -> Network Settings -> IPv4 Addresses: Add the Raspi's IPv4 address as a local DNS-Server

  4. Home Network -> Network -> Network Settings -> IPv6 Addresses: Always assign ULAs

  5. Home Network -> Network -> Network Settings -> IPv6 Addresses: Enable RFC 5006 and add the Raspi's IPv6 address as a local DNSv6-Server

Now to the effects of these settings:

I noticed at the pi-hole admin frontend that my mobiles were sending IPv4 requests but no IPv6 requests. Whereas the Windows notebook was sending IPv4 and IPv6 requests. This might explain the following behaviour:

  • If 3) was not set the page loading from my mobile devices was quite slow (around 10-15 seconds)

  • If 5) was not set the page loading from my notebook was quite slow (around 10-15 seconds)

  • If 2) was not set to the Raspi's IPv4 address (but to Cloudflare's 1.1.1.1 and 1.0.0.1 for example), I still got some ads on some sites as well as ads before youtube videos. The pi-hole admin site showed some DNS-requests to the pi-hole, but some requests seemed to use the Fritz!Box's DNS-server IPs.

  • Im not sure if 4) has any actual effect since my ISP doesn't provide IPv6 services.

I also tried the pi-hole FTLDNS beta but without any noteable effect.

The current situation is that all devices are loading all sites quite fast and most of the ads are blocked. Some are still loaded but this might be related to ad-servers that are not on the blacklist. The general benefit for me is the blocking of ads within mobile apps and the blocking of my Sonos system sending home usage statistics every couple of minutes. The rest of the ads that are displayed while browsing the web I'm blocking with uBlock Origin and uMatrix.

Since I didn't find any hint on the internet regarding 3) and the related slow loading of web pages on mobile devices I wanted to share this info with you. Maybe it is helping someone. :slight_smile:

Cheers
espi
Hamburg, Germany

By the way: I want to thank the team behind pi-hole for their great work and dedication. Keep up the fantastic job you're doing! :+1:

1 Like

Hello espi,

I followed your instructions, because I have the same configuration and the same problem like you.
Your solution is the same as described in german magazine called "c't".

But, the only thing I did NOT setup was:
Internet -> Account Information -> DNS-Server: Enter IPv4-address of the Raspi as primary and secondary DNS

Here I am using server 9.9.9.9. I am not an expert, but these should be the DNS server the fritzbox has to use at the end (after pi hole) for getting data from the internet ? So, I am running the same solution like the magazine.

Most of the time I have iOS safari is waiting für data... after a couple of seconds the display is showing the requested site, but the loading progress bar is at 50%.

My router refused to allow two identical IP's for the DNS servers. Adding a "real" DNS server IP there ended up serving ads in 50% of the time. I had to add a fake IP there like 10.0.0.0 (it can be any internal IP).

The issue with IPv6 is that Windows will assign you a default address from Microsoft and tunnel in - if the IPV6 is enabled in your network card settings (and you don't have IPv6 enabled by your provider).
If you don't know how to disable it it manually, here is a link:

Das Problem langsam ladender Seiten und nicht funktioniendem Chromecast lässt sich beheben, wenn du in der Fritzbox ins Heimnetz -› Netzwerkeinstellungen gehst und nach unten scrollst bis du das siehst:
DNS-Rebind-Schutz
FRITZ!Box unterdrückt DNS-Antworten, die auf IP-Adressen im eigenen Heimnetz verweisen (DNS-Rebind-Schutz). Hier können Sie eine Liste von Domainnamen angeben, für die der DNS-Rebind-Schutz nicht gelten soll.

Domainnamen-Ausnahmen:
Hier die IP vom Raspberry eintagen.

Erst jetzt ist Pi Hole fertig konfiguriert.

Danach können lokale Clients wie SmartTV oder Chromecast Pi Hole als DNS Server finden und das Problem der langsam ladenden Seiten wird auch gelöst, da nicht auf IPv6 vergebens gesucht wird, nachdem IPv4 abgeklappert wurde, was enorm Zeit kostet...