What does HackerNews think of hosts?

๐Ÿ”’ Consolidating and extending hosts files from several well-curated sources. Optionally pick extensions for porn, social media, and other categories.

Language: Python

#1 in Python
#1 in Security
I think these two things help make Windows more usable.

* O&O ShutUp10++ โ€“ Free antispy tool for Windows 10 and 11 | https://www.oo-software.com/en/shutup10

* StevenBlack/hosts: Consolidating and extending hosts files from several well-curated sources. Optionally pick extensions for porn, social media, and other categories. | https://github.com/StevenBlack/hosts

hosts file (modified) sourced from; Steven-Black - hosts @GitHub : https://github.com/StevenBlack/hosts

cat /etc/hosts |grep -i 'jsonip.com'

  0.0.0.0 jsonip.com
  0.0.0.0 www.jsonip.com
Sounds like you'd benefit from adblock. I've used the Steven Black adblock host list [0] for some time now on all my PCs and it works extremely well.

[0] https://github.com/StevenBlack/hosts

I prefer Apple, but there are times when you can't get away from Windows.

For those times I find the following tools really useful.

But like the article says... its is hard to trust a company that build all this adware crap into my OS in the first place. =P

* O&O ShutUp10++ โ€“ Free antispy tool for Windows 10 and 11 || https://www.oo-software.com/en/shutup10

(I turn all the recommend options off, and then re-enable Clipboard History.)

* GitHub - StevenBlack/hosts: Consolidating and extending hosts files from several well-curated sources. Optionally pick extensions for porn, social media, and other categories. || https://github.com/StevenBlack/hosts

(And if you block things at the host level, remember to disable DNS Caching.)

* How to disable Windows 10 DNS Cache services || https://social.technet.microsoft.com/Forums/windows/en-US/a0...

* Wise Program Uninstaller - Uninstall, Remove or Force Uninstall Programs Completely || https://www.wisecleaner.com/wise-program-uninstaller.html

I am in the exact same boat.

And lately it's the same sort of shit... My dad will get a text message on Facebook from a "friend" (usually a dead friend) and it'll say something like, "I'm Joe's kid, and things are hard since Joe died and we need some money or we'll have to pull our kid out of school..." paraphrased, but that's generally the angle people take. And the scammers will send hundreds of messages... it makes it so hard.

I'll ask, "Dad, why did you have a 200 message conversation with this person?"

"Oh, I thought they were a scammer, but you never know... and after a while they just seemed legit." Again, paraphrased. Dad can't talk for less than 30 minutes at a time. =P

So what do I do?

1) I lock his devices and home router. I turn off data on his phone so he can only make calls when he's not on Wifi. I block ads (since those can take him to sites he doesn't need to be on), and I block fake news. https://github.com/StevenBlack/hosts

2) I sit down with him once a month and delete people on his Facebook account. I want to delete the whole account... but he uses it to talk to some of his friends... and it's important for him to keep connections. That said... FUCK Facebook for not doing more to prevent scammers. On some level, there's just no way to stay clean there. We delete anyone who died, or anyone who he hasn't spoken with in 1 year, and anyone who he has had any sort of falling out with. And man... the most frustrating thing is how many of these people we delete that just keep re-adding themselves. Facebook really should not re-suggest a friend if you delete them. It's such a sticky cancer with how it operates.

3) I sit down with him once every 2-3 months and we delete everyone in his phone and make sure contacts are up to date. I tell him to never take a call from a number he doesn't recognize, and to call me immediately if there's ever any doubt.

4) I run all the updates on his computer every month. And I check for programs that he doesn't need. Dad only has "User" access on his laptop, and I've toyed with the idea of taking away his ability to install any programs... but when we did that it meant he'd call me a lot more because someone had a Zoom meeting and he needed me to run an update. It's always a cost vs. benefit analysis with restrictions.

5) I have his phone paired to an old Tablet so I can keep tabs on him... I hate that I have to do this, but he's lost over $50k in the last 10 years to scams. And it's not the money that even matters... it's how down and how he cuts off connections with everyone once he gets scammed. The las time he lost like $5k... he wrote a check and mailed it, and somehow the person was able to cash it even though they weren't the name on the check. Anyway Dad really beat himself up over that, but it's not healthy for old people to be shut-ins. They need to talk with other people every day or the risk of dementia goes through the roof...

6) While not a perfect protection... we keep like $2k in his debit card, and we don't use credit cards. He has protections on his debit card from his bank, and that way he's got minimal exposure to online spending and credit card fraud. We just transfer over money every month from his savings / retirement accounts. And now that Dad is in his 80s, I mostly manage those for him.

7) I love for him to interact with people. Every time he goes to the dog park or gets out and meets a new friend... I'm happy and I want him to have conversations with people. But fucking hell, I swear 90% of the people who want to talk to the elderly are scammers. And at some level too... Dad doesn't mind being scammed if someone is willing to talk to him for 30 minutes... just listen to his stories. That's the hardest part. I tried hiring a nanny, just a local kid who was a baby sitter... to go and talk to him. It was OK. I tried Better Help, and tried to find a shrink that would work with him and not tell him she was a shrink... not be so overt about the whole process, but that was a disaster. Once Dad found out it was a "mental health" related call he got really mad... past generations don't have good opinions on that sort of thing. It's hard... I don't have a great solution. I got Dad a personal trainer, and a maid, and a nanny... and between them he has enough random people to talk to every week. He looks forward to it, and that helps him avoid being lonely and talking to scammers online I guess. I don't know, it's sad and it's hard.

8) I try and go grocery shopping with him, so that way random people don't "offer to help" and then hit him up for payment. One other thing I noticed is that Dad literally has no concept of money. On one hand, "Candy bars cost a nickel!" and on the other, "Oh that Uber ride to the VA at peak hours just cost you $155..." or "The dentist wants $8,500..." and like... it's hard to have any sense of what things should cost. He doesn't want to be seen as cheap, so if someone drives him to the grocery store he normally gives them like $100... and then, if that person is shady they'll start offering to drive him other places... and like I said I don't know the answer here, at some point he will need to be put in a home away from people. It's hard. Right now he lives in an apartment near me, and there area all ages there. He isn't sick, he walks 5-10 miles a day with his dog... he's active, likes to go dancing, but he's just so SO very lonely. Desperate for anyone to talk to... but he can't hear, and he only wants to talk about things he's an expert in, and only to people who want to listen to him with a lot of respect... so it's hard. The moment someone scoffs at a story, or doesn't just sit attentive and focused... Dad will get mad. He just wants to be relevant, and he's not. Right? Like that's the core problem is how do you gracefully allow yourself to be comfortable with not being relevant? All of his friends are dead. Most of his knowledge is really old. It's all part of the dying process I guess, but it sucks. And I'm sure it'll suck for me too if I ever get that age.

9) Dad has coverage through the VA -- and just real quick, we're all so screwed if we don't fix health care. The only thing that makes any of this possible is that it's "free" and there aren't insurance companies sending bills... I can't hardly deal with my insurance companies now, and if I have to do this when I'm 80... well, fuck... I'm sure I'll just not bother going. It's all so damn complicated. I have no clue how much money something will cost -- and while that's "ok" for me now, for someone on a fixed income that would be debilitating. I just don't know... I feel like we're all really sunk if we don't get health costs under control in the US. It's a total shit show.

10) "Use the app" -- fuck this for the elderly... every time someone is like, "Please use this call system, that changes the volume every recording..." (those just blow out his hearing aids) or someone tells him to "download an app to book an appointment!" I want to scream. Accessibility issues are real, especially for the elderly. And nobody takes any of it seriously. His phone uses 250% font size. Guess what apps work? Like none. And still everyone wants him to use an app. I hate it. I end up installing all the apps for him on my phone and just doing it for him.

11) Fuck all the people who sell data about the elderly. Looking at you, American Airlines. Not 30 seconds after I booked a flight where I requested "Sky Cab" (the golf cart service) they called him to offer him some sort of emergency medical alert device, that comes with a monthly service fee. AND they told me it was "to help with your upcoming flight" -- Dad totally would have bought this if I hadn't gotten the call. And this sort of shit is all over... it's not just people scamming the elderly, it's all these shitty companies. Highly recommend using your phone number for a few months to get a feel for what it's like for the old folks. It's really bad out there to be old. Any sort of predatory advertising to the elderly... I wish I could just zap the people doing it in the balls. It shouldn't exist. Makes me so mad... and like I said, it's all over. The scammers sales people know where to find data on who is old, and AI is just going to make spotting the real messages that much harder.

That was a rant, sorry... this shit is hard. And I wish it wasn't.

And... don't get me started on how child care has a tax break, but elder care doesn't. And how shitty workplaces generally are about taking time off to help elderly parents, vs. someone just calling in, "My kid is sick." I don't want things to be harder for parents with kids, but I do want things to be easier for adults to who take care of their parents. It's all just really shitty and a ton of work. Dad has PT once a week, and he had some other health issues that were once a week... and let's be honest... my boss at the time was a real See You Next Thursday about me taking time off to help Dad, meanwhile she never gave anyone flak for cutting out early to have to pick their kids up from school. Having older parents who need a hand... it all just sucks. But it beats the alternative.

to add one that hasn't been mentioned in this thread, a good hostfile can both block ads and speed up your internet. https://github.com/StevenBlack/hosts
Steven Black runs a hosts file on GitHub with regular updates. https://github.com/StevenBlack/hosts

There are a bunch of file variants to weed out specific bad actors.

It's well currated though I will disclaimer it has broken a few websites in the past for me. Maybe that's a good thing.

I really liked Windows 10. Like I honestly felt like Microsoft had gotten their head out of their ass and started trying to build a good product again.

Sure, you had to use O&O ShutUp (1) and block ads via hosts table (2) and turn off DNS Caching (3) or it would take like 10 minutes to find your internet connection again every time you re-booted... but I felt like they were going in the right direction, and I could mute all the crap I hated.

And then Windows 11 came out. And it has zilch in the way of any new features, and they keep pushing more and more of the annoying crap. Like a "search" button that forces Bing, and weather than forces Bing, and "online" that forces Teams and whatever else. And you can turn stuff off, for the most part...

But I just feel like they're constantly trying to find new ways to spam their crap on me, and force their other products or services -- many of which I've already told them numerous times I hate. I hate Bing. I hate Teams. I hate all that schlock they're peddling. And they keep making it more pervasive, and harder to turn off.

And look, there's no UX improvements I enjoy, there's no features I need... Windows 11, and all of Microsoft's new features for Windows are just garbage. And it was hard to install, I had to do some hacky stuff to get my motherboard to spoof some settings so I could even put Windows 11 on what was at the time a 2-year-old computer.

If I had one wish for Microsoft, it would be to stop trying to sell me things via the OS. Just build a good OS, and stop all the other crap. It's not making me say, "Gosh, I love all your new features!" It's making me actively look for alternatives.

(1) https://www.oo-software.com/en/shutup10

(2) https://github.com/StevenBlack/hosts

(3) https://learn.microsoft.com/en-us/answers/questions/47441/ho...

Steven-Black - hosts - GitHub : https://github.com/StevenBlack/hosts

Pull all the (URL)s for Instagram from the lists.

Two easy ways to block trackers and ads... without a firewall.

Adding blockers to the hosts table still works with Chrome... hope they don't muck with that...

https://github.com/StevenBlack/hosts

But if they do... there are always DNS solutions you can add to your Router.

https://nextdns.io/

I use Firefox, but even things like Windows spams ads at you if you let it. So many things have Google trackers built in too...

In my experience, reporting this is a waste of time. The nodes doing the actual spamming and crawling sites for exploits are far removed from the IP addresses you see in your access logs and in your email headers. The actual abusive nodes are talking to multiple rings of compromised command-and-control hosts a.k.a. C&C hosts. Those hidden command-and-control hosts then control compromised hosts that you are seeing in email headers and access logs. For every one node taken offline there will be a myriad of compromised nodes in their available pool to take over. Blocking nodes is an endless game of whack-a-mole. The people your VPS provider gave your contact info to are likely also victims of bots and would have no idea how to fix the problem. VPS providers are also not going to disable all the compromised VM's as many of those people will not take responsibility and will instead get upset with the VPS provider and move to a different provider and this has financial ramifications.

Most VPS providers don't have the technical resources to track down the command-and-control nodes. This requires a higher level of visibility they do not have. The folks that have this level of visibility will not likely assist with bot noise unless the bots are also being used to steal government secrets or embarrass government officials or attack public infrastructure. There are ways to trick some of the bots into attacking public infrastructure but I would not want to be caught up in that legal quagmire as I am easy to find and bot owners are not.

In summary, the best one can do is either configure systems to discard the noise in web logs and block low reputation IP addresses in their mail servers or if one feels the desire to do something, create tarpits/honeypots for the bots to get stuck in. Tarpits have very little impact on bots but if one wanted to feel like they were doing something it's a start. For example, I have numerous nodes that accept email for all the popular domains. Spam bots think they are relaying thousands of emails through my nodes per day but that is a tiny fraction of a tiny fraction of the spam that people will receive. I am not even making a tiny dent in the problem.

As a side note, there are ways to block some of these bots if you control your web and email servers but that is another topic all together and if too many people implemented such techniques then the bot developers would evolve around it. Apologies if this sounds defeatist. Some use blocklists [1][2] to reduce the noise on their web servers and RBL/RSL [3][4][5] servers to reduce the noise on their mail servers but this has limited efficacy and I think it just takes up memory by increasing the routing table or takes up CPU by making large ipset lists for iptables.

[1] - https://github.com/firehol/blocklist-ipsets

[2] - https://github.com/StevenBlack/hosts

[3] - https://www.uceprotect.net/en/index.php?m=6&s=0

[4] - https://www.spamcop.net/fom-serve/cache/291.html

[5] - https://www.spamhaus.org/zen/

Your browser shouldn't even be capable of resolving advertising.com

You can use https://github.com/StevenBlack/hosts as your hosts file, but even better is TLD and wildcard domain blocking with dnsmasq or dnscrypt-proxy.

I hung a pihole with everything blocked (https://pi-hole.net/) directly off my router, and I (probably somewhat redundantly) also use a hosts blocker (https://github.com/StevenBlack/hosts) on my non-phone machines. It's annoying for the first day or two, but you get used to it really quickly.
I can never read any of your blogs without disabling my hosts[] filter, as it includes amplitude.com

Pity as they are great, so I often pass on them!

[] https://github.com/StevenBlack/hosts

For what it's worth here's what I do:

I run my own /etc/hosts file based on : https://github.com/StevenBlack/hosts

This should block the popular ad-ware companies.

I also browse with Brave, and use their inbuilt "shields" feature to block 3rd party/cross-site cookies. I don't install any additional browser plugins.

Would be nice to kill all the consent-popups, as you say.

I use the NoScript addon on Firefox and auto filter out all IPs that end up on Steven Black's Host list - https://github.com/StevenBlack/hosts

That takes care of a significant chunk of the ever increasing pollution.

The adtech world is totally reponsible for the state of affairs. They need to pay a big price or its not going to slow down anytime soon.

This is a refreshingly wholesome startup. Well done!

I am really interested in the social media blocking. I have been quitting social media for 5 or 6 years now. The hardest for me was Quora, I think. I don't know why, they where like the mafia: "Just when I thought I was out, they pulled me back in" What worked for me was blocking them on the router and the hosts files[0]. This meant there where two steps to unlocking a blocked site. And for extra friction I used a long router password and don't save it. The longer it takes you to reach the thing, the more opportunity to change your mind.

The good news is that social media addiction is relatively quick and painless to cure. I stopped missing them after about a week.

And there are a lot of positive outcomes from quitting this stuff (especially for doomscrollers and dopamine junkies ;) I have been quitting a lot of stuff recently like sugar, sweeteners, coffee, carbs and processed food! And for a little while it's rough. Quitting anything will be rough for at least a few days. But as you strip away more sources of artificial dopamine stimulation, the body compensates, or maybe you just become more sensitive to it. Real life starts to give you some of that dopamine buzz that you where chasing online (or in a can of diet soda!)

But but now I start to feel little dopamine kicks whenever I take some small positive action like doing some exercise or fasting, or walking past the junk food.

[0] crowd sourced hosts files to block ads, social-media and porn: https://github.com/StevenBlack/hosts

    >It's insanely hard to avoid that main stream media content
It's very easy. I modify my hosts file with lists such as Steven Blacks [1] or the EnergizedProtection host lists [2] which are both continuously updated files containing know ad server URL's and whatnot.

I can honestly say that I haven't seen an ad in years, let alone any form of divisive content. But I also might just not visit many websites where they show that stuff. The best solution to that is to avoid those sites if possible.

[1] https://github.com/StevenBlack/hosts

[2] https://github.com/EnergizedProtection/block

- Install ZRAM on your Linux distro

- Ublock Origin is a must. If not: https://github.com/StevenBlack/hosts. Clone it, backup /etc/hosts, append the content of the /hosts subfiles MINUS the localhost and ::1 lines.

- Use a bare window manager, not a DE. Cwm, icewm, doesn't matter. Use lxappearance to set up your gtk theme to something you like.

Use /etc/hosts based blocking, e.g. https://github.com/StevenBlack/hosts

This way you become mostly invisible to the ad and malware industry, no matter which browser you use.

Have JavaScript toggle next to address bar and keep JavaScript off by default. Most cookie banners will disappear.

Use Reader mode for daily news browsing. Most things will disappear except for main content. And it makes Internet less addictive.

The difference between swimming and drowning is subtle - flailing your limbs frantically vs relaxed movement. To many complex solutions will make us drown.

Consider swimming instead :)

Depending on your used adblock, I'd guess it is the bottleneck. Plugins running in the browser are not made for this. If you are using browser plugin-based adblocking, try to disable that temporarily for testing, and exchange it with some host-based solution, for instance this https://github.com/StevenBlack/hosts no matter which OS your are on. Then see if it feels faster. If you are already doing it this way, forget what I wrote :-)
how does anyone surf the web in 2021 without an ad-block? I'd be more interested in opinions about the article.

https://github.com/StevenBlack/hosts

https://addons.mozilla.org/en-US/firefox/addon/ublock-origin...

usually I factor cost of data plan into the decision of where I go next for the reasons you mentioned. Since you say you're doing UI and frontend I think this is a big challenge when fetching and pushing binary data like static assets.

To reduce your data consumption and improve load times as well as security/privacy you may consider a /etc/hosts blocklist[1]. It's not going to help with reducing data in zoom calls, Netflix and podcasts but it adds up. Also don't forget application/service specific settings like switching all preferred resolution in video to the lowest quality etc.

DNS traffic can be reduced (and sped-up) with a local cache (dnsmasq - or better yet dnscrypt-proxy[2]).

[1] https://github.com/StevenBlack/hosts

[2] https://github.com/DNSCrypt/dnscrypt-proxy

PSA: Add this to /etc/hosts if you don't want other sites collecting info from you via Google Analytics/Ads

    0.0.0.0 googleanalytics.com
    0.0.0.0 googlesyndication.com
A more complete list of things worth adding to /etc/hosts here (I'm not affiliated with this):

https://github.com/StevenBlack/hosts

Edit: A warm mention of Steven Black's hosts, https://github.com/StevenBlack/hosts for those interested in more of OP's subject.

Use both methods instead of just one. They differ in nature, and can be implemented at different perimeters of your network. Maybe there exists certain chokeholds in the network where multiple devices can be protected in one go?

Personally, I would have pure IP blackhole routing performed in the router providing WAN access to internal networks. A blanket protection for all desktops and 802.11 devices inside.

Many devices today are locked-down and editing hosts records can be untrivial. Instead of relying on 0.0.0.0 routing through hosts, the same effect can be obtained by setting up a personal DNS server e.g. bind9 with RPZ's listing the targeted domains[1].

Why all that hassle? Because an unrooted smartphone with a Wireguard link to the DNS server (or full-on VPN using that DNS server), can have lookups made through the server you control. And that DNS service is available to use on any local network/Wi-Fi one has to use. IIRC 3G/4G/5G WAN routes were harder to get right, but I think it was possible. One could always route all traffic through a purposeful VPN.

Defense in depth.

---

[1]: fb.rpz.zone:

;RPZ $TTL 10 @ IN SOA rpz.zone. rpz.zone. ( 37; 3600; 300; 86400; 60 ) IN NS localhost.

.facebook.com IN A 0.0.0.0 .facebook.net IN A 0.0.0.0 .fbcdn.com IN A 0.0.0.0 .fbsbx.com IN A 0.0.0.0 .fbcdn.net IN A 0.0.0.0 .edgesuite.net IN A 0.0.0.0

I added this to my /etc/hosts

https://github.com/StevenBlack/hosts

What is the advantage of having DNS on a separate device other than that it provides ad blocking for multiple devices?

>It's... So much faster. However, it does a poor job of blocking advertisements and trackers. I'll be going back to Firefox for that reason, I can suffer the slowness.

You can block ads just by editing your hosts file. There's no need to depend on any browser's particular functionality in order to get rid of them. Nor on extra hardware (Pi-hole), for that matter. I have a cron job download a prefilled copy from a popular github repository [1] daily.

[1] https://github.com/StevenBlack/hosts

[0] is perhaps even more concerning - apparently it bears a striking resemblance to Steven Black's (slightly more reputable) list[1] [edit: plus a few hundred thousand other rules of questionable sourcing].

[0] https://gitlab.com/The_Quantum_Alpha/the-quantum-ad-list/-/i...

https://github.com/StevenBlack/hosts/issues/1487

[1] https://github.com/StevenBlack/hosts

I been maintaining a little hosts project for blocking ads and trackers [0]. I've casually noticed over the years that a lot of the lists out there combine other people's lists - some are more upfront about it then others. That got me thinking, who was the first list to block domain X? That is where this website comes in.

A lot of popular block lists are hosted on GitHub, so that made it really easy to clone the repo and do a full history import of the project. I made a little script that could walk the git history and generate a JSON file containing all the unique versions to import [1]. The oldest lists from Steven Black's popular hosts project: April 2012 [2]. Other lists are harder to find history on, so they just go back as far as this project does.

As a test to watch domains from one list get consumed by other lists, I added a fake domain to my list 'developer-dan-list.clksite.com'. This root domain is particularly useful since it is a wildcard and will have a valid DNS response to any subdomain. As expected, I saw it get added to multiple lists in the following days.

[0] https://www.github.developerdan.com/hosts/

[1] https://github.com/blocklist-tools/github-history-generator

[2] https://github.com/StevenBlack/hosts

Just put Steven Black's host list[1] in to /etc/hosts

Not sure what, apart from extra cpu cycles, pihole adds over this.

[1] - https://github.com/StevenBlack/hosts

This is great. I do not see WPM and ACC stats though. It just shows empty placeholder for those. I use PiHole and https://github.com/StevenBlack/hosts to block ads. I see that the google analytics is not resolved properly in dev tools. Is that the issue with WPM/ACC stats?
If you want to replicate that kind of configuration that is as painless as possible you just have to go into the extension options/configuration. Head to the "My rules" tab and you will find a rule, towards the top of the rule list, that says:

"* * * block"

This rule acts as a default blacklist. If you switch it to:

"* * * allow" it will allow everything by default (except the blacklisted domains, which overrule this).

Then in the "Assets" tab you can configure your blacklists, I can recommend Steven Black's lists. He curates and consolidates several of the most famous ones:

https://github.com/StevenBlack/hosts

He maintains several variants according to themes you may want to ban (adware, malware, fakenews...). Choose the combination that suits you.

I've used this successfully for years.

https://github.com/StevenBlack/hosts

While not your traditional ad blocker done via browser extension, it does the job quite well and blocks the requests at the OS level.

I'm not the author or maintainer, just a very happy user.

I use uMatrix to block scripts on certain domains. I used to use NoScript for this, but switched to uMatrix when I found that it gave me much more fine-grained control over what to allow or block.

For ad-blocking, I supplement uMatrix with uBlock Origin. It has its own block lists that it perodically

On top of that, I use privoxy as an http proxy. Unfortunately, it can't filter https.

Yet another part of my defense is DNS blocklists that I put in to /etc/hosts.[1]

Using this combination, I virtually never see any ads.

[1] - https://github.com/StevenBlack/hosts

> and I should disable FF's DoH support?

yeah there is no reason (I can think of) why you need FF DoH with your setup. In fact if you were to enable DoH in FF it would bypass your pie-hole - so you most certainly want to avoid that.

my setup looks pretty much like yours with some additional /etc/hosts blocking[1] on the client just to avoid the round-trip to the pie-hole. it's also a double insulation (but it's more of a performance reason than bc of paranoia). I found that switching off ipv6 dns resolution in FF (`network.dns.disableIPv6` in about:config) has tremendously sped up my DNS lookups in FF (though I haven't had time to analyze why).

in case you're worried about homograph phishing attacks you could also add a regex to your pie-hole's dnsmasq (not sure what piehole uses but I know it has a fork of dnsmask that supports regex) so that punicode domains (any domains matching "xn--") are sinkholed to 0.0.0.0 as well.

[1] https://github.com/StevenBlack/hosts

This repo has a 3-week track record, by one contributor.

Disclosure: Some of us have been actively curating such amalgamated lists for a long time. https://github.com/StevenBlack/hosts

I have been using NextDNS with a few block lists configured at the router level and device level.

The internet experience has improved a lot since ads and trackers are blocked system wide.

A few block lists that I would recommend:

1. Steven Hosts - https://github.com/StevenBlack/hosts

2. Adguard DNS - https://github.com/AdguardTeam/AdguardSDNSFilter

3. disconnect.me

The amount of DNS requests made silently in the background is astonishing across all devices.

Also a shameless plug for the extensible, amalgamated hosts file I actively curate:

https://github.com/StevenBlack/hosts

I actually have been doing some work with MaraDNS to have the ability to have a pi-hole sized blacklist. The main source of pi-holeโ€™s blacklist is this Git repo:

https://github.com/StevenBlack/hosts

That is about 60,000 hosts, so I added MaraDNS support to have up to 500,000 blacklisted names. Since itโ€™s a speed-optimized (not size-optimized) cache, each element takes about a kilobyte of memory, so a blacklist this size takes about 60 megabytes of memory for MaraDNS to store (on a modern Core i7 7600U processor, it only takes about two seconds to load all 60,000 elements in to memory), but itโ€™s very rapid to use.

The script to take that blacklist and convert it in to a MaraDNS compatible format is here:

https://github.com/samboy/MaraDNS/blob/master/deadwood-githu...

There are ways to make the memory footprint of the blacklist smaller, but this was a quick and simple way to implement a medium sized blacklist. Finding ways to have, say, 10 million blacklist elements with a small memory footprint is left as an exercise for the reader.

My current project is to make a proper Docker container for MaraDNS.

You can always deploy/update (remotely via Ansible or something else) custom hosts file on their workstations. https://github.com/StevenBlack/hosts
i should mention, it also acts as a pi-hole via dnsmasq configured with these hosts:

https://github.com/StevenBlack/hosts

I do this, any traffic to port 53 gets re-directed using IP masquerading to my local DNS server which uses the blocklists from https://github.com/StevenBlack/hosts.

By coincidence since I did that I need to do a hard reboot of my Mi Box android tv device everyday as when you turn it on from standby and open Youtube / Netflix it goes in to a frozen state.

This is just one of many reasons to use StevenBlack's Hosts [1] list to block this type of behavior. While it doesn't currently block link.wacom.com, it would have prevented the subsequent requests google analytics. It works even better when paired with a PiHole [2] to protect all devices on the network.

[1] https://github.com/StevenBlack/hosts

[2] https://pi-hole.net/

You can use some of those crowdsourced lists of hosts files to ban trackers, ad networks, and the like, i.e. https://github.com/StevenBlack/hosts or https://github.com/notracking/hosts-blocklists, you can use pi-hole even as a docker container https://github.com/pi-hole/docker-pi-hole or install it in your router. You can use privacy plugins and extensions for browsers, like umatrix, etc. You can use Tails, which uses 2 VMs. You can use a VPN service (that's controversial since you then put your trust on the VPN provider), or roll your own with something like algo from trailofbits, or streisand. You can combine multiple VPNs an/or Tor, with VMs. Mirimir wrote some articles on that setup. If you want to go full in you can use QubesOS, although now Joanna Rutkowska left the team.

I'm sure there are other options...

Adguard Pro in VPN mode works system wide on iOS. I personally use this filter list https://github.com/StevenBlack/hosts
A good hosts file will help, a lot.

https://github.com/StevenBlack/hosts

Disclosure: there are many like it, but this one's mine.

Not OP but read about it on this hosts config [0].

From that page:

> We prefer to use 0.0.0.0, which is defined as a non-routable meta-address used to designate an invalid, unknown, or non applicable target.

> Using 0.0.0.0 is empirically faster, possibly because there's no wait for a timeout resolution. It also does not interfere with a web server that may be running on the local PC.

[0] https://github.com/StevenBlack/hosts

This might help:

https://github.com/StevenBlack/hosts

Apart from adware and malware it offers to block url's falling into other categories like fakenews, social, gambling, and porn.

> simple text files called Tracking Protection Lists (TPLs) to allow or block third-party requests from specific domains

Sounds like a hosts file, and the same end result could be achieved in any browser/system-wide by using a curated one such as:

https://github.com/StevenBlack/hosts

Or is Edge Tracking Prevention more effective in some way?

I just periodically update my host file with - https://github.com/StevenBlack/hosts which blocks most of the ad serving domains

gmail/youtube etc work fine

sticking OPNSense on one of these [1] was probably the best LAN decision i've made, besides a Synology backup NAS.

it acts as a pihole and a lot more (firewall, device vlan isolation, vpn termination, etc). i have these hosts files [2] loaded into its DNSmasq config.

[1] https://www.amazon.com/dp/B072ZTCNLK

[2] https://github.com/StevenBlack/hosts

Setting aside the rewards program, people can and will use ad-blockers. Even if those were illegal for some reason, there are lists available (such as hosts, https://github.com/StevenBlack/hosts) where you can make known tracking/advertising/etc hostnames non-routable

Are you saying that site owners should feel violated by folks installing ad-blockers (or using host files)?

There's the option for hosts-based blocking, too; unified hosts[1] for example

[1] https://github.com/StevenBlack/hosts

> And on linux I always set up local SSH servers on everything which comes with its own maintenance baggage.

It sounds like you need to invest a little time in automating basic networking stuff (shell scripts do fine). I do not think there is a royal road with effortless magically secure configuration and authentication for random devices, but once you have IPv6 with dynamic DNS for all your machines on your own domain with SSH public keys (this all gets automated by the shell scripts), things get really nice. rsync, Unison, TRAMP, remote shells, SSH port forwarding/SOCKS proxies, whatever else you can think of, just works.

The Internet is a surprisingly nice place when you get rid of NATs and VPNs.

No IPv6 from your ISP? Start looking for a new one, but in the meantime grab a unique local IPv6 prefix for your home network (I find that useful to have anyway; and with IPv6 there are no worries about having multiple addresses on an interface) and use that shell script automation to take advantage of /etc/hosts (and put a blocklist in there while you are at it: https://github.com/StevenBlack/hosts).

I use AdGuard Pro in combination with StevenBlack/hosts [0] and a custom DNS. This is used for system wide (not just Safari) ads/tracker blocking. Adding custom filters as and when required.

- [0] https://github.com/StevenBlack/hosts

In my experience, the size of the hosts file matters on some devices, and some os.

On older versions of Windows, for example, networking and browsing slows noticeably as the size of the host file increases.

The same can be said for rootable mobile devices, though itโ€™s less noticeable off WiFi because cellular latency is so much higher.

I would guess, marginal consumer and home routers will suffer with larger hosts files, but I donโ€™t have sufficient experience to claim this for certain.

Background: years of discussions and issues at https://github.com/StevenBlack/hosts, which I maintain.

Yep. I don't trust any third-party add-ons in my browser to have full read/write access to all web sites I visit.

I use a domain block list in `/etc/hosts`: https://github.com/StevenBlack/hosts

Steve Black's hosts file ... just specify "-e social" or "--extension social" option, or use a "myhosts" file to name your own domains for a subset (e.g. all of facebook or whatever)

https://github.com/StevenBlack/hosts

>Another option is using something like Pi-Hole, says Wright. โ€œThis works on the DNS level and has blacklists of adverts as well as malicious URLs.โ€

You can also run a ridiculously simple script from time to time (or create a cron job that does it for you, for example) to update your hosts file periodically, using the same blacklists[0]. No extra hardware needed.

[0]: https://github.com/StevenBlack/hosts.

OpenWRT ships with dnsmasq. You just need to edit /etc/hosts to have all the unwanted domains resolve to 0.0.0.0

I like to get my host list from https://github.com/StevenBlack/hosts

Just download a Host file[1] and you can have system level ad blocking on your laptop.

As for running an adblock on your router, if your router supports openwrt, openwrt has an adblock addon[2] that is easily configurable.

Unfortunately, you will lose out on the statistics that Pi-hole collects.

[1] https://github.com/StevenBlack/hosts

[2] https://github.com/openwrt/packages/tree/master/net/adblock/...

I'm tree weeks into:

git clone https://github.com/StevenBlack/hosts.git && cd hosts && pip3 install --user -r requirements.txt && python3 updateHostsFile.py --auto --replace --extensions social porn gambling

and going strong.

What I figured so far is that the trick is to stay away from the browser. So I've removed Safari on my iPhone (well, more like hidden), I've changed my rss client to newsboat - command line one, I moved all of my youtube subscriptions into rss, I've written a script that keeps track of videos I would like to watch from those rss subscriptions, downloads them in bulk in background (all hail systemd timers) and then gives me dmenu to pick a video to play in mpv.

I had Google app installed on my iPhone but I noticed that I use this thing to surf mindlessly again, so I deleted it. Basically I can't google stuff anymore on my phone =/. But so be it, it turned into communicator/navigator/music player/food orderer.

I did start reading books again because... Well, taking phone into toilet is pointless now, gotta do something, so I started reading books again. I'm actually reading multiple at the time, there is a paper book in the toilet, there is a book on my iphone and there is a book on my laptop, three completely unrelated topics so whenever I feel like procrastinating I read one of them. Well, except the one in toilet, I'm not procrastinating, I'm working hard there ;-).

Stay away from the browser guys.

https://github.com/StevenBlack/hosts

Solve all my problems with ads and also effective against social, porn and gaming addiction.

If you don't mind a bit more config to tune to your precise preferences, I'd highly recommend https://github.com/StevenBlack/hosts
I experienced the same thing on one of my credit card account management interface.

I have been using ublock + configured my router as DNS server using https://github.com/StevenBlack/hosts/

The DNS server has the advantage of filtering for the mobile devices on WiFi as well, which is a nice plus.

I use Unbound[1] for DNS caching and local DNS. I have Unbound configured to forward queries to a local Stubby[2] instance that does DNS over TLS to CloudFlare.

Stubby does keep-alives and not restricted to a single thread and opening a new connection per query like Unbound which is why I used it as a forwarder as a few more features than Unbound.

In my Unbound config I have an include to a blocklist generated from https://github.com/StevenBlack/hosts, essentially I pipe the data from that repo through awk [3]

I have an Android TV box so also have a firewall rule to redirect all queries to 8.8.8.8 and 8.8.4.4 port 53 to my local DNS server.

No GUI's, solid and stable. Only thing missing is I need to write a cron job to fetch the latest block list, validate, convert to Unbound format and reload the daemon. It's only a 10 minutes job just something I haven't got round to yet.

OpenBSD is really good for running this stuff.

[1] https://www.nlnetlabs.nl/projects/unbound/about/ [2] https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Daemon+-+... [3] https://deadc0de.re/articles/unbound-blocking-ads.html

In my home network I use a hosts file to block unwanted tracking. I use a file from this [1] project, which makes it easy to filter out the type of content you don't want.

The nice thing about this is that it blocks requests from any device in my network, especially from those which cannot be configured with a firewall or adblocker.

[1] https://github.com/StevenBlack/hosts

Shouldn't the hosts file from https://github.com/StevenBlack/hosts + uBlock Origin + uBlock Origin Extra be the perfect anti-tracking combo?
I run an OpenBSD router with PF:

pass in quick on { $lan $wireguard } proto udp to { 8.8.8.8 8.8.4.4 } port 53 rdr-to 192.168.2.1

Locally I run Unbound for caching, local dns zones and ad/malware domain blocking[2]. I have a DNS forwarder in Unbound configured to a local Stubby[1] instance that does dns over tls to Cloudflare.

Having done "big data" contract work for the largest telco in my current country of residence who are some of the worst skilled people I have ever work with, your local ISP is highly likely abusing your DNS history profiling your household for various questionable things just as much as Google. At least with Cloudflare they have a clear privacy policy[3] and I have faith their technical skill to anonymize data and use it can't be as bad as my ISP.

[1] https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Daemon+-+... [2] https://github.com/StevenBlack/hosts [3] https://developers.cloudflare.com/1.1.1.1/commitment-to-priv...

Anyone know if there's a host file blacklist for malicious domains only? Most of the ones I've seen block all ads.

The first time I experienced a malicious ad in Spotify on my Linux machine, I started blocking them via my hosts file [1]. I was only hoping to block malicious sites but it ended up giving me a completely ad-free experience in Spotify.

As a free user I accept that I will be exposed to ads in exchange for not paying for the service, but they seriously need to do a better job vetting for malicious ads.

[1] https://github.com/StevenBlack/hosts

I have been using this custom host file for a few months and it works like a charm. Just have to update it from time to time (but it can be automated).

https://github.com/StevenBlack/hosts

"This repository consolidates several reputable hosts files, and merges them into a unified hosts file with duplicates removed. A variety of tailored hosts files are provided."

I have like 30,000 entries in mine and there is no performance issues.

https://github.com/StevenBlack/hosts

The zero[1] version of it works a little faster.

I am using the Unified hosts file[2] (mentioned in the article), it is a great way to combine many other hosts including Dan Pollock's list.

[1]https://someonewhocares.org/hosts/zero/

[2] https://github.com/StevenBlack/hosts

Annoying, but just block at DNS or host level.

* Pi-holeยฎ: A black hole for Internet advertisements โ€“ curl -sSL https://install.pi-hole.net | bash || https://pi-hole.net/

* GitHub - StevenBlack/hosts: Extending and consolidating hosts files from several well-curated sources like adaway.org, mvps.org, malwaredomainlist.com, someonewhocares.org, and potentially others. You can optionally invoke extensions to block additional sites by category. || https://github.com/StevenBlack/hosts

Someone will make money selling an ad blocker device that's just a configured Raspberry Pi with a consumer-friendly way to install it on a home network.

You could just disable the pi-hole dns server in your routers DHCP server (so it will not be used by all network devices by default.)

Then, only on your own phone/laptop/etc, manually configure your pi-hole as the DNS server for the corresponding home Wifi network. So only the devices you manually configure will use the pi-hole.

Also, you can create a shortcut on your phones homescreen to disable pi-hole for x minutes by just a single click (without having to log in.) see: https://discourse.pi-hole.net/t/is-there-an-api-command-to-d...

Another idea might be to remove all blocklists in pi-hole, and only add this list: https://github.com/StevenBlack/hosts

I use pfBlockerNG (which is basically just a pi-hole equivalent that integrates with pfSense) and I only use the Steven Black list:

https://github.com/StevenBlack/hosts

It seems to be well curated. Breakages are rare, and if there is one, you can file a bug.

Works well.

Apologies, it wasn't down because of HN! I can't edit the original post now, but it was just my computer blocking your domain at the hosts level via https://github.com/StevenBlack/hosts

I should have realised, but it's the first time using that hosts list has ever stopped a website I've wanted to go to from loading, so I didn't think of it.

This is one of many reasons I do not feel the least bit bad about having a Pi-Hole [1] on my network to block ads and trackers [2]. The companies behind this are predatory. The advertisement and analytic platforms they use are complicit. I have an obligation to shield my family from their manipulative and malicious intentions. The option to just avoid these types of apps/websites is a farce. The platforms have infiltrated our lives at every level - analytics are always being collected. My own ISP has the right to spy on me and my family and sell our activities to be used against us in the form of advertisements.

[1] https://pi-hole.net

[2] https://github.com/StevenBlack/hosts

For anyone not interested in setting up pi-hole, having a blacklist host file is just as effective for your local machine [0]. I have that full list set as my /etc/hosts file on a Streisand server [1] and run all my devices through that with IPSEC VPN. It's a little more flexible than pi-hole since you can use your mobile devices over LTE with it.

[0] https://github.com/StevenBlack/hosts

[1] https://github.com/StreisandEffect/streisand

I use AdBlock https://www.adblockios.com on iOS which runs a local DNS server that can blackhole domains. It doesn't work well on very large host files so I gave up trying to import https://github.com/StevenBlack/hosts, but it does work well for smaller lists.
There's also Steven Black's host file:

https://github.com/StevenBlack/hosts

As far as I know, the pi-hole maintainers do not maintain any of the default block lists. I maintain a list [1] that is then feed into the popular host list by Steven Black [2] - which is a default list.

I definitely do not want to break things for people and I'm happy to remove any reasonable domains from the list. I wouldn't consider google analytics a reasonable one to remove - but you get the idea. I hate to hear you had a bad experience of it. If my list had the breaking domains for you, I would of loved to have a ticket opened where we could discuss it. Sometimes it isn't clear cut between ads & tracking and useful services.

[1] https://github.com/lightswitch05/hosts

[2] https://github.com/StevenBlack/hosts

I use a /etc/hosts-based (https://github.com/StevenBlack/hosts) approach to add blocking across my machines, but I have found some sites (fansided.com) comes to mind, which detect that I'm blocking and won't let me read them. How easy is it to get around this with the pi-hole?
I think you might have missed the point of my comment. If you block AMP scripts, you will definitely encounter broken sites. The point I was trying to make are that those broken sites are mostly junk anyways. Overloaded with ads, tracking, and other manipulative content geared at turning me into the product. I haven't missed those sites any. However, I recognize that I'm not the average user, which is why these blocks are in my aggressive list. I initially put the blocks into my regular block list which is then consumed by Steven Black's hosts [1]. Very quickly a ticket was opened to whitelist AMP [2]. Funny enough, the user requesting that AMP be white listed posted screen shots of broken advertisements disguised as 'news' articles. To make everyone happy I moved it to my aggressive list which isn't included in Steven's project.

Anyways, long story short, I don't like AMP and don't mind the occasional broken site. But it's definitely not for everyone.

[1] https://github.com/StevenBlack/hosts

[2] https://github.com/StevenBlack/hosts/issues/657

I've been using Wireguard on both my laptop and my Android phone for about two months. I've been using the wg-quick systemd units, and everything has worked amazingly well. The only downside I've notice is slightly increased battery consumption on my phone, but that's to be expected (it uses approximately 5% of the battery per day).

I use dnsmasq to resolve DNS queries on the server side. Dnsmasq's configuration file includes entries to block connections to ad networks, based on Steven Black's host file [0]. It's a great to achieve ad blocking on Android, since Google has banned ad blockers from the Play Store.

Jason Donenfeld, Wireguard's author, has a Patreon page: https://www.patreon.com/zx2c4

[0] https://github.com/StevenBlack/hosts

A good solution I've found for ad blocking is using the following hosts file:

https://github.com/StevenBlack/hosts

Which sinkholes every known ad/malicious domain. It's been pretty useful, and it hasn't broken nothing important yet.

A Pi-hole is the only real solution for this as far as I can tell if you still want to use apps on your TV like Netflix. I use a Pi-hole as well with several block list sources, my favorite being Steven Black's hosts: https://github.com/StevenBlack/hosts
This too was a problem for me (and sometimes continues to be). I've been using `hosts` (https://github.com/StevenBlack/hosts) to block all of the social sites so I have to rethink my decision to visit one. It's enough of a hiccup to stop the mindlessness of it. Thankfully, Hacker News still feels valuable and worth the time I spend on it.
I'm Steven Black and these are the hosts files some diligent friends and I continuously curate for you. Try the variant with the social media blocking if you really want to go cold turkey. https://github.com/StevenBlack/hosts
By using something like this: https://github.com/StevenBlack/hosts

I have effectived block lots of analytic service. I can see how well it works when I open Chrome Dev Tool aand see bunch of console error due to js tracking fail to load.

Any browser plugin is inferior to using a hosts file. Hosts file's blackhole any network request before even attempting to make a connection. These browser plugins only help if you're using the specific browser โ€” they aren't going to help that electron/desktop app that's phoning home. They wont help block inline media links (Messages on a Mac pre-rendering links) that show up in your chat programs which attempt to resolve to Facebook. They also wont block any software dependency library that you install without properly checking if it's got some social media tracking engine built in.

I don't even waste time or cpu cycles with browser based blocking applications. Steven Black's[1] maintained hosts files are the best for blocking adware, malware, fakenews, gambling , porn and social media outlets.

[1] - https://github.com/StevenBlack/hosts/

Steven Black's list is better. More complete and also has hosts for other social outlets, ad networks and trackers to block.

https://github.com/StevenBlack/hosts/

I don't use that list, I use Steven Black's [1] list has 1004 entries which is more complete than this list. It would be less, but more than 16. Even at that, you're right it would definitely reduce the size.

- [1] https://github.com/StevenBlack/hosts/

I don't have a list that I can easily share, but you can curate your own off of https://github.com/StevenBlack/hosts
you can do it quite effectively outside the browser using a host block[1] list or pi-hole. my uBlock now only fires sporadically for cases I don't catch with the /etc/hosts approach (e.g. disallowing e.g. remote fonts)

[1] https://github.com/StevenBlack/hosts

Also, block all tracking servers at the hosts level by adding rules in your /etc/hosts. I've been using https://github.com/StevenBlack/hosts for a few years now and it's incredibly useful.
Here's how I protect myself from addictive sites:

I have a (fairly bad) smartphone and no data plan (just a small 200mb/mo emergency contingent). I have deleted all social media apps (Facebook, Twitter, Instagram, Messenger, all Games). On the go, I use apps with offline capabilities. Pocket Casts for Podcasts, the Kindle app for my books, Spotify for music. Those get synced on Wifi

If I use any apps of this kind, I do so on my Laptop:

Here, I have more control by using three Chrome extensions:

- Stay Focused (https://chrome.google.com/webstore/detail/stayfocusd/laankej...) which gives me a few minutes per day on a set of blacklisted sites.

- Newsfeed Eradicator ( https://chrome.google.com/webstore/detail/news-feed-eradicat... ) - does exactly what the name suggests. Still possible to use Facebook for events and to talk to friends

- Distraction Free Youtube (https://chrome.google.com/webstore/detail/df-youtube-distrac... ) deactivates the features that suck you down the Youtube rabbit whole of by clicking on recommended videos.

On top of that, I use uBlock which blocks all the ads that I would have to endure on my phone.

A little lower level, I have a modified hosts file which blocks social media sites: https://github.com/StevenBlack/hosts

Obviously it is possible to circumvent all of these self-imposed obstacles, but taking a couple of seconds to "take the safety off" is often enough to remind me why I have blocked those pages in the first place. It is enough time to let my prefrontal cortex reign in my dopamine seeking reptile brain.

Taking these measures has allowed me to drastically reduce my time spent on distracting sites.

My solution right now (on macOS) is Gas Mask[1] (a menubar hosts file manager) combined with some very nice hosts files[2]. It certainly kills of most of the pop-ups I run into.

[1]: https://github.com/2ndalpha/gasmask [2]: https://github.com/StevenBlack/hosts

I've used https://github.com/StevenBlack/hosts for years now, and any close- and extended-family laptop or computer I touch gets it either silently or with some explanation if they ask me what I'm doing. Noone has ever complained. My only gripe is that I haven't written a cron-type update script for my extended family members who use Windows.

Which means I only update it for them periodically. It's still better than not doing it.

It aggregates someonewhocares.org and many other sources into a combined hosts file, to the point where it actually slows down DNS lookups noticably on most computers.

I even use it on my phones, and all other devices where I can access the filesystem.

Almost all devices in the world support a hosts file, becase most of the network stacks in use today spring from the same code.

EDIT: It has 40-55 thousand host entries, depending on which version you use. In my scripts I just curl https://raw.githubusercontent.com/StevenBlack/hosts/master/h...

You can actually use a "Remote" hosts file with Gasmask and set the update interval in preferences. I actually just figured this out after a little bit of trouble -- my issue was that Gasmask cannot files from Github or any https site[0]. There are non-Github mirrors listed in the table at https://github.com/StevenBlack/hosts which I have been able to use successfully.

[0]: https://github.com/2ndalpha/gasmask/issues/90