4 ms·
$ sudo echo 127.0.0.1 www.google-analytics.com >> /etc/hosts if you actually execute the above command, take care to enter ">>" rather than ">", otherwise you'
by MichaelCrawford 11y ago
$ sudo echo 127.0.0.1 www.google-analytics.com >> /etc/hosts
if you actually execute the above command, take care to enter ">>" rather than ">", otherwise you'll bork your own networking.
There are better ways to accomplish this, but this way is the most straightforward.
- dredmorbius 11y agoSo long as you're going that route, I'd suggest the set of 60k+ hosts from the uMatrix Chrome extension Long-lived malware domains http://mirror1.malwaredomains.com/files/immortal_domains.txt http://mirror1.malwaredomains.com/files/immortal_domains.txt Malware domains http://mirror1.malwaredomains.com/files/justdomains http://mirror1.malwaredomains.com/files/justdomains Peter Lowe’s Ad server list http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext http://pgl.yoyo.org/adservers/serverlist.php?hostformat=host... Malware Domain List http://www.malwaredomainlist.com/hostslist/hosts.txt http://www.malwaredomainlist.com/hostslist/hosts.txt hpHosts’s Ad and tracking servers http://hosts-file.net/.%5Cad_servers.txt http://hosts-file.net/.%5Cad_servers.txt Dan Pollock’s hosts file http://someonewhocares.org/hosts/hosts http://someonewhocares.org/hosts/hosts MVPS HOSTS http://winhelp2002.mvps.org/hosts.txt http://winhelp2002.mvps.org/hosts.txt uMatrix chrome extension: https://chrome.google.com/webstore/detail/%C2%B5matrix/ogfcmafjalglgifnmanfmnieipoejdcf https://chrome.google.com/webstore/detail/%C2%B5matrix/ogfcm...
- MichaelCrawford 11y agoThanks a million. I'm looking specifically for analytics servers. I expect many are to be found among the lists you supply. The reason is that I don't object to advertising, but I do object to tracking. While not a leading player, most blatant is www.hosted-pixel.com.
- dredmorbius 11y agoI object to both. Advertising itself is a significant problem. Note that some of the lists also include "objectionable" content -- sites such as goat.se and the like. If you prefer your reality unmediated, examine and adjust. I've added a few of my own entries in addition to those listed, though increasingly I'm relying on others' compilations. I've written a script to regenerate my /etc/hosts file from updates: 0.0.0.0 www.google-analytics.com # Privacy 0.0.0.0 ssl.google-analytics.com # Privacy 0.0.0.0 js-agent.newrelic.com # Privacy 0.0.0.0 tag.perfectaudience.com # Privacy 0.0.0.0 connect.facebook.com # Privacy 0.0.0.0 sb.scorecardresearch.com # Privacy 0.0.0.0 b.scorecardresearch.com # Privacy 0.0.0.0 stats.g.doubleclick.net # Privacy 0.0.0.0 stats.visistat.com # Privacy # Tracking gifs: https://news.ycombinator.com/item?id=9441401 # Sun Apr 26 07:04:40 PDT 2015 0.0.0.0 gs.dailymail.co.uk # Privacy 0.0.0.0 gum.criteo.com # Privacy 0.0.0.0 i.dailymail.co.uk # Privacy 0.0.0.0 moat.pxl.ace.advertising.com # Privacy 0.0.0.0 www.hosted-pixel.com # Privacy