Use IPv6 ULA addresses for Pi-hole


Many users have reported that frequently changing IPv6 addresses cause page load to be slow or even prevent from working at all. The issues can be fixed by updating the IPv6 address in /etc/pihole/setupVars.conf followed by a run of pihole -g.

However, this solution turns out to be very inconvenient since it might be necessary to change the IPv6 address on a regular basis (maybe even multiple times a day). An alternative approach we are currently looking into is the usage of ULA addresses which should not be changing, even though the upstream GUA address may change.

Usually, there exists a setting in the router for enabling ULA addresses in the local network. Examples of how the corresponding settings look like on some routers are posted in this thread. As before, copy the address and replace it in your /etc/pihole/setupVars.conf

Hint: The following code snipet might come in handy

IPV6_ADDRESS=$(ip -6 a | grep 'fc\|fd' | awk -F " " '{gsub("/[0-9]*",""); print $2}')
echo ${IPV6_ADDRESS}
sed -i.setupVars.bak "/IPV6_ADDRESS/d;" "/etc/pihole/setupVars.conf"
echo "IPV6_ADDRESS=${IPV6_ADDRESS}" >> "/etc/pihole/setupVars.conf"
pihole -g

Verstehe IPv6 nicht so ganz
Why do blacklisted domains show IPv4 as "Pi-holed" but not IPv6 in the query log?
3 Tage pihole, naja
Slow / No Web Page Loading
Pi hole with Mac OS X not loading webpages (IPv6)
Pi Hole, Speedport, IPV6 - ich weiß nicht weiter
Issues with IPv6 connectivity
Merkwürdiges Verhalten von Pi-Hole
Dns server ipv6 address
Ipv6 error
What is setupVars.conf and how do I use it?
Webpages are really slow or even not loading. windows 10, chrome
Pi-hole v3.1 Has Been Released
Local host querying api.github a lot
FritzBox und IPV6
Ipv6 in settings ist falsch
I'm having trouble with my DNS and I don't know where to start troubleshooting
Trouble blacklisting and blocking ads
HTTPS Slow, all known commands/patches have been applied without success :'(
PiHole has 2 ip addresses
Blacklist problem
Why do some sites take forever to load when using Pi-hole?
Fails loading https sites on iOS
Pihole blocking 0% of queries
Certain pages won't load in Safari
Link-Local-IPv6 as default
IPv6 and privacy
Pihole is not working - Help
Some websites are failing to load
Pi hole enabled but not blocking ads
Websites timing out
Pi hole enabled but not blocking ads
Pihole works after restarting dns but stops blocking ads after a few minutes
Temporary failure in name resolution
Deutsche Telekom, IPv6 and AAAA Querries
If you have a firewall enabled on your Pi open port 443 if you get timeouts, it might help
More web site slow
[SOLVED]Pi-Hole Not Working ( not resolving DNS) after some time ( It works for an hr or so only when its configured initially in router as DNS)
Pi-hole funktioniert nicht
Web Interface not showing any queries
Why Some Pages Load Slow When Using Pi-hole And How To Fix It
Pi-hole won’t work unless dns service is manually restarted after each boot
Why does my IPv6 address disappear after a little while?
Pi Hole seems not to block ads although it's active
Blocked https links stall for 20 seconds
Pi-hole not blocking ads
[SOLVED] PiHole web server shows its nice logo but not the control panel
"FTL offline" and "Lost connection to API"
"FTL offline" and "Lost connection to API"
Can't connect to web interface (I have no idea what I'm doing)

Deutsche Telekom - Speedport W 723V


Deutsche Telekom - Speedport W 724V


A post was split to a new topic: IPv6 ULA and Fritzbox


Fritzbox Cable 6490 (Firmware 6.51) Thanks @Dmx !

This option is also available in the Fritzbox 7490 and @Erdnussknacker suggests that it should be available on all Fritzboxes running FRITZ!OS firmware greater equal version 6.50.


A post was merged into an existing topic: IPv6 ULA and Fritzbox


So I started getting IPv6 from my ISP recently. And here’s how I got ULA working with pi-hole and pfsense router.
I get IPv6 by DHCP6 on the WAN interface with “Use IPv4 connectivity as parent interface” & “Send IPv6 prefix hint” checked, and a prefix size of 64. On the LAN side it’s set to track-interface (wan).

  1. Set ULA in RA subnet (pfsense)
    In Services > DHCPv6 > RA, under Advertisements, add a subnet fd00:: and prefix /64
    Note: We don’t need DHCPv6 server. It’s disabled by default - it’s ok to leave it as it is.
  2. Set static pihole IPv6 (ULA)
    On the pihole, set a static IPv6 (Debian in my case) fd00::20/64 without any gateway or DNS. Refresh your interface “ifdown ens160; ifup ens160” and check your IP with ifconfig. Ideally you should see an fe (link-local),fd(static ULA)and 2000 (GLA) IP, and you should be able to ping6 google.
  3. Check connectivity
    Now you should be able to ping pihole’s IPv6 (fd00::20) from your computer.
  4. Add pihole ULA in pfsense DNS
    In pfsense System > General, assuming you have already entered pihole’s IPv4 address there, add pihole’s IPv6 address as well with the gateway as none. RA will send the LAN interfaces’ IPv6 to clients (which changes on boot).
    Note: This is assuming that you have DNS forwarder enabled.
  5. A reboot maybe required to realize the setting done in step 1 and/or 4


For all users of the Speedport Hybrid router by Deutsche Telekom: take a look at the above screenshot for the Speedport W 724V, it’s the same as for the Hybrid.

Home network -> Home network (LAN) -> Name and address of the router -> Use local IPv6 address (ULA)


What is the suggested way if the router does not have the option to turn on ULA? I’m having a “Connect Box” from my ISP (UPC). :frowning: