Using lancache with a FritzBox is not very straight forward:
- You need to have access to the DNS settings in the FritzBox web interface. Some providers disable this setting to force their customers with specific settings, like their own (mostly slow) DNS servers.
- Set both DNS server entries to your local IP address, on which the lancache is accessable.
- The FritzBox has a DNS rebind protection. To disable this for the hostnames, which are used for the lancache, you need to specify them as a list format in the web interface.
All the hostnames can be found at uklans/cache-domains. Download the repo and switch into the directory.
cat *.txt | grep -v "^#" | sed -E 's/\*\.//' | sort | uniq
These commands pipe their output as a input into the next one. This is a very powerful technique in the world of Unix.
-
cat *.txt
- display the content of all files ending with ".txt" in a concatenated form -
grep -v "^#"
- discard all lines beginning with a hashtag (comments) -
sed -E 's/\*\.//
- substitute all '*.' (wildcards) from the hostnames with an empty string. The symbols need to be escaped with a '\' for them to be interpreted literally and not as a placeholder. (beware of the -E flag, I mostly use the more modern Extended RegEx mode, which also is the standard in most scripting/programming languages) -
sort | uniq
- sort all the lines in order to remove duplicates withuniq
Have you found any way to still have your internet working for all devices when your lancache dns is down?
Pointing both servers to my lancache dns will probably make internet on all devices that use the fritz.box as DNS (as advertised in dhcp) be gone :-/
But the fritz.box seems to recognize unauthorized answers as a fault, and immediately swaps to any other option it has (secondary server, or public one if the option to use public DNS when errors occur)...
Actually, it seems I didn't wait long enough. Pointing both primary and secondary to my local DNS and enabling the option to swap to public servers in case of errors does work - it takes a few seconds, but even with my DNS down the internet automatically comes back.
It seems to take a good while for the FB to switch back to its original DNS settings :-/
Although dis- and reenabling the option seems to do the trick.