Live data from Hacker News

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

someonewhocares.org

31–40 of 104 posts

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

#32
This sounds much better conceptually than it winds up being in practice.

I tried one of these before, but crap like interstitial ad pages on news sites being hosted on some of these advertising sites made my browsing experience occasionally more annoying with the hosts entries.

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

#33
post #25
post #22

Earlier quoted context omitted.

What's the concern? It's pretty easy to see all entries point to 127.0.0.1.

You've just illustrated his point because not all entries do point to loopback.

if you pass it through grep, you can see that virtually every non-comment line refers to 127.0.0.1:

    ~/tmp% grep -v "^[[:space:]]*#" fred.txt | grep -v "^[[:space:]]*$" | grep -v 127.0.0.1
    books
    guestbook
    hosts
      text file
      rss feed
      0.0.0.0
      0 text file
      old macs
      0 old macs
    math links
    origami
    photos
    polls
    siteoftheday
    home
     Hosted by:
      theorem.ca
    how to make the internet not suck (as much)
    255.255.255.255	broadcasthost
    ::1		localhost
    fe80::1%lo0     localhost
    Fri Feb 22 08:05:36 2013top
    ~/tmp%
And I just realised now that the junk at the top of the output comes from me doing a Select All on the web page to highlight everything first, and it picked up the headers! Ooops. So there's in fact 3 non-comment lines that don't refer to localhost.

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

#34
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?

Shock sites (like the comments in the file call them) is probably more accurate word for the sites listed in the beginning.

And the majority of host names there are for tracking and ad sites.

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

#35

Or run your own caching recursive DNS server, and have it cache entries for as long as possible. Google DNS, Level 3 DNS can't shake a stick at my local cache, which is off course to be expected.

Care to link a tutorial on how to do this?

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

#36
I once had to troubleshoot why a Windows (XP I believe) computer was taking so long to browse the web. Turns out, it had a hosts file like this (generated from Spybot, IIRC). Cleaned out the hosts file, and it ran much faster.

Just something to think about when using massive hosts files.

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

#38
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?

Shock sites (like the comments in the file call them) is probably more accurate word for the sites listed in the beginning.

And the majority of host names below them are for tracking and ad sites.

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

#40
post #25
post #22

Earlier quoted context omitted.

What's the concern? It's pretty easy to see all entries point to 127.0.0.1.

You've just illustrated his point because not all entries do point to loopback.

Looking at the body of the text, rather than the head/footer, and excluding comments lines, here is what I get with counts:

  [~]$ cat hosts_example.txt | grep -v '#' | awk '{print $1}'| sort | uniq -c
       56 
        1 ::1
     9674 127.0.0.1
        1 255.255.255.255
        1 fe80::1%lo0
Post reply on HN