Live data from Hacker News

Using a Hosts File To Make The Internet Not Suck As Much

someonewhocares.org

71–80 of 104 posts

Re: Using a Hosts File To Make The Internet Not Suck As Much

#71
post #7

I see a load of porn sites. Just how does this Make The Internet Not Suck? (damn it's even more annoying to write incorrect casing than read it.) I thought this was going to block the fifty "Share this! Email this!" buttons on websites or something... If you don't visit porn websites, you won't visit these domains anyway; what's the point in blocking them in a huge hosts file?

"Just how does this Make The Internet Not Suck? (damn it's even more annoying to write incorrect casing than read it.) "

With the exception of "The" the titling is just a proper use of titling case. Do you find it annoying to read newspapers? I imagine it is the awkward phrasing that you (and I) find annoying.

Re: Using a Hosts File To Make The Internet Not Suck As Much

#72
post #24
post #15

Think twice before using someone else's hosts file, unless you can actually review every entry. Not that I really think anything funny is happening here, but it is a huge security risk to use non-authoritative DNS like this by taking someone else on their word that their hosts file is legit.

If every entry routes to 127.0.0.1, what's the worst that could happen?

If you were malevolent and stupid enough, you could 'remotely' hack yourself (and set your own HP printer on fire).

Re: Using a Hosts File To Make The Internet Not Suck As Much

#74
post #52

Earlier quoted context omitted.

I run BIND at home for my network and take advantage of that to do the following: https://isc.sans.edu/diary/Easy+DNS+BIND+Sinkhole+Setup/7930 I also have a webserver that any black holed domain is sent to so that there is no waiting for a web request to time out. The first time I put it in place I didn't have the webserver so the performance when hitting one of these was horrible. I also use it for any ad server or…

Exactly this. I have been creating master zones on my named.conf and pointing them to a blocked.txt file. My method is more cumbersome, the one you linked is very streamlined. Excellent, and thanks!

I also made a little thing for adding additional zones to the list when I was playing a little with Bootstrap. I wrote a little page to add, enable and disable (if I blocked something important) entries. Then a cron job to pull the enabled domains, build the conf file and reload BIND.

Re: Using a Hosts File To Make The Internet Not Suck As Much

#77
post #6
post #4

for domains you don't want to route try 192.0.2.x - that range is reserved for examples and won't end up with spurious requests to stuff you're running on localhost.

Will browsers immediately fail the connection, or will it try to make the connection and wait for a timeout? I generally use 0.42.42.42 because Class-A addresses can't start with 0, so they fail immediately.

it does wait for a timeout, so "route" was poorly chosen. it just wont get anywhere on most configurations because they respect the 192.0.2.x is examples only convention.
Post reply on HN