The example you provided, is actually using the CNAME to disguise the third party domain, so blocking the entire query is the correct decision. Some of the blocklist have already added f7ds.liberation.fr
, so this is no longer a valid test case.
pihole -q f7ds.liberation.fr
Match found in list.5.dbl.oisd.nl.domains:
f7ds.liberation.fr
Match found in list.18.pgl.yoyo.org.domains:
f7ds.liberation.fr
Match found in list.40.raw.githubusercontent.com.domains:
f7ds.liberation.fr
I have been running my script (see earlier entry), and it appears that this (cname is in blocklist, domain isn't) is happening a lot more than you would expect. This implies a lot of things that should be blocked, aren't blocked at all, examples:
0.0.0.0 globalredir.akadns.net # CNAME a23.g.akamai.net found in gravity list
0.0.0.0 csw.lenovo.com.edgekey.net.globalredir.akadns.net # CNAME a23.g.akamai.net found in gravity list
0.0.0.0 com-c-3.edgekey.net.globalredir.akadns.net # CNAME a23.g.akamai.net found in gravity list
0.0.0.0 microsoft.com-c-3.edgekey.net.globalredir.akadns.net # CNAME a23.g.akamai.net found in gravity list
Will everything will still work after pihole-FTL is released with CNAME detection, that will be the bigger question. The blocklist(s) do contain the CNAME, but blocking is currently never triggered.
However, I'm also getting some entries where the cname and the domain are in the same dns zone, example:
0.0.0.0 www.nieuwsblad.be # CNAME nieuwsblad.be found in gravity list
When this CNAME is encountered, the site would be blocked, using your logic.
The question is if this isn't a valid use of a CNAME, isn't this what it was initially suppose to do?
After careful consideration, it's probably NOT wise to make an exception in the pihole-FTL code, as it would increase processing time.
Because the CNAME is never detected in the current version of pihole-FTL, but would be in one of the next releases (hopefully), users will suddenly be confronted with false positives, which they will have to whitelist. You should definitely issue a warning, whenever pihole-FTL is going to block cnames.