To use (or abuse) /etc/hosts using 0.0.0.0 was (until now) the best way I knew to do the trick. However, I wasn't aware of the CNAME Cloaking dirty trick.I would recommend either using NextDNS with your desired settings. It's the easiest way to have DNS-based adblocking.
Alternatively, you could install your own resolver (e.g. unbound) and set it up to block a list of domains, etc. This is better/cleaner than (ab)using /etc/hosts for that.
I probably won't need to install my own resolver for I run a mere desktop. OTOH, the free plan of NextDNS seems to be enough for my needs. I'm considering to sign up since I read their article.
Statistics: Posted by frafz — 2024-06-14 04:04