nss-dontstalkme is a nsswitch module that maps host lookups of well known web trackers to localhost so they become uneffective.
While other solutions such as browser plugins only target specific applications this affects the whole system.
See the README file in the source.
The source code is available via:
git clone https://git.sigxcpu.org/cgit/nss-dontstalkme
and can be browsed here.
Debian Packages for Jessie can be found here.
If using the Debian package now further setup is required. You need to change /etc/nsswitch.conf otherwise (see the README again). Check if it's working via:
getent ahostsv4 foo.google-analytics.com
This should return only addresses of localhost.
- Move blocked domains to config file?
nss-dontstalkme has it's own mailing list for general discussion and patches.
nss-dontstalkme was written by Guido Günther.
nss-dontstalkme is free software and licensed under the LGPL Version 2.1.