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
Thank you! I stumbled accross rebind protection yesterday but didn't think of it today -.-