HOSTS file size and issues

Discussion in 'other software & services' started by Fly, Dec 16, 2018.

  1. Fly

    Fly Registered Member

    Joined:
    Nov 1, 2007
    Posts:
    2,201
    Quite honestly I don't know where to put this question since it doesn't seem to fit neatly into any existing section of the forum.

    System: desktop Windows 7 64 bit. I'm currently running a version of the MVPS HOSTS file that I installed in 2012. A few minor tweaks to block a couple of other websites. For me the main issue is to keep the ads off my screen and it has done so nicely ever since I put it on the computer. These days, occasionally I see an unwanted ad but nothing really bad. I've seen what a screen filled with ads can look like.

    The thought occurred to me to update the MVPS hosts file, and I may have experimented with that years ago. I don't remember to be honest.

    Quite possibly the size of that HOSTS file has increased dramatically, I'm not sure by how much. This system is almost a decade old, and I really don't want to slow it down. Sometimes I can just notice that accessing the web is a bit slower than a decade ago.

    Insight, opinions, options ? The idea of updating that file occurred as making this computer a bit more 'future proof' since I have absolutely no intention of installing Windows 10. But if it's going to be just another drag on resources I'll pass. Current main browsers are Palemoon and to a lesser extent IE 11.
     
  2. Stefan Froberg

    Stefan Froberg Registered Member

    Joined:
    Jul 30, 2014
    Posts:
    636
    One problem with using hosts file as adblocker is that it really does not scale that well as you noticed.
    Another problem is that it does not support regular expressions so that you could keep your file
    smaller.

    So maybe instead of hosts-file install some adblocker extension (like uBlock origin) to your main browser (I honestly don't know anything about Palemoon. Is it a firefox fork? )

    Also, if you have old router lying somewhere that supports OpenWrt you could give it a new life and install unbound DNS with adblocker list. Or even build your own router from raspberry pi 3 (with Pi-Hole or something like that installed to it) or similar minicard computers...

    So basically, instead of hosts-file you could use browser based adblocking solution or router-wide DNS solution or even both to surely catch all baddies...
     
  3. Fly

    Fly Registered Member

    Joined:
    Nov 1, 2007
    Posts:
    2,201
    I know I can add all kinds of things, but have never considered it mnecessary or useful. I know, one could use all kinds of tools to reduce tracking and protect my privacy. I didn´t consider that necessary although I explored those subjects once upon a time.

    My question about the HOSTS file as such stands, obviously.
     
  4. Stefan Froberg

    Stefan Froberg Registered Member

    Joined:
    Jul 30, 2014
    Posts:
    636
    Then you are doomed to slow surfing. There is no other way around as your hosts file size keeps increasing.

    Router based solution is especially nice because it saves resources

    EDIT:

    Here's example how to do not only adblocking but also your very own DNS resolving with $35 rasperry pi + software. Especially if you have many network devices (laptop, desktop, phone etc..) this greatly increases their privacy & bandwith (blocks the unneeded crap & ads ever reaching your devices on network level and caches the DNS stuff for faster surfing)

    Code:
    https://pi-hole.net/2018/06/09/ftldns-and-unbound-combined-for-your-own-all-around-dns-solution/
    
    EDIT 2:

    As time goes on you will need to add more and more entries to host file.
    For example, let's say you have doubleclick.com in your hosts file.
    That's fine. it blocks doubleclick.com

    But it does not block ads.doubleclick.com or more.ads.doubleclick,com or even.more.ads.down.your.throat.doubleclick.com etc....

    Why? Because like I said earlier hosts file does not support regular expressions or even wildcards.
    You can't do: *.doubleclick.com in your hosts file and expect it to block every subdomain that doubleclick can (and will, and for free) create.
    You would have to create new entry for each subdomain for doubleclick.com

    Unlike uBlock origin and DNS-level blocking.

    EDIT3: Also, you can't do selective blocking either with hosts file.

    For example: thisisgooddomain.com/lotsofbadadshere

    uBlock origin would block that but not hosts file or DNS-block (that's why I recommended using both)

    This would also be impossible for hosts-file (and DNS blocking) but not for uBlock:
    .*/somepath/badtrackerscript.js

    So from the three blocking methods hosts file is most limited (no regular expressions/wildcards, no selective blocking)
    It was nice over 10 years ago but times have changed....
     
    Last edited: Dec 16, 2018
  5. xxJackxx

    xxJackxx Registered Member

    Joined:
    Oct 23, 2008
    Posts:
    5,013
    Location:
    USA
    I was going to suggest changing all occurrences of 127.0.0.1 to 0.0.0.0 in the file but it looks like they are doing that now, so I am going to agree with the idea that an Ad Blocker is the better way to go.
     
  6. KeyPer4Life

    KeyPer4Life Registered Member

    Joined:
    Dec 18, 2013
    Posts:
    1,131
    I would recommend going with adding uBlock Origin to Pale Moon.
    You have the option to add MVPS HOSTS filter list if you so desire
    and list can be updated as well.

    I have used Pale Moon with uBlock Origin in both Windows and Linux OS,
    although haven't felt the need to use MPVS HOSTS list.
    Of course the more lists you select in UBO you may experience a slowdown.
     
  7. Floyd 57

    Floyd 57 Registered Member

    Joined:
    Mar 17, 2017
    Posts:
    467
    Location:
    Europe
    Not really... Depends on what you add
     
  8. FanJ

    FanJ Updates Team

    Joined:
    Feb 9, 2002
    Posts:
    3,390
    Hi Fly,
    The MVPS hosts file is, on average, updated once in about the three months.
    Updates are posted in the Update Alerts forum https://www.wilderssecurity.com/forums/update-alerts.34/
    Example for, at this moment, the latest one : https://www.wilderssecurity.com/threads/mvps-hosts-file-update-october-01-2018.408784/

    The site of the MVPS hosts file gives good guidelines how to update.
    The main site : http://winhelp2002.mvps.org/hosts.htm
    Guidelines how to update it on Windows 7 are here : http://winhelp2002.mvps.org/hostswin7.htm

    I hope this helps a little bit.
    (I use it on Win 7 64-bit)
     
  9. Fly

    Fly Registered Member

    Joined:
    Nov 1, 2007
    Posts:
    2,201
    @FanJ , I knew about that ...

    You're using it on Windows 7 ... hardware and configurations may come into play.
    Partly based on @Stefan Froberg 's post I was expecting slowdowns with increasing file sizes. I don't really need the latest version since the old one blocks almost anything I come into contact with. Aside from a few infrequent popup ads.
     
  10. Brummelchen

    Brummelchen Registered Member

    Joined:
    Jan 3, 2009
    Posts:
    2,823
    i am using a mix of mvps and host-file.net ATS list for basic blocking, ofc few exceptions i need in a browser. the rest is done with ublock. i update manually by merging current int o past.
     
  11. summerheat

    summerheat Registered Member

    Joined:
    May 16, 2015
    Posts:
    1,628
    As the MVPS hosts file is relatively small (compared to other hosts files) this should not be an issue.
    This is not surprising as a hosts file blocks requests on the DNS level. It can block websites/domains but it cannot block something like, e.g.,

    https://www.example.com/ads/popup.js

    as it would be only able to block www.example.com completely. In order to block such annoyances you need a blocker like uBlock Origin which is the best one available.
     
  12. Fly

    Fly Registered Member

    Joined:
    Nov 1, 2007
    Posts:
    2,201
    @Brummelchen ,

    Are you using it on Windows 7 and how would your hardware compare to mine (almost a decade old, quad core) ? No slowdowns ?
    I vaguely recall downloading and testing a newer version of that HOSTS file (why wouldn't I have done that ?) but I never installed/kept a newer version since 2012. My guess would be it was due to speed issues.

    I think I did read somewhere that the size of the HOSTS file had increased by a lot. And I just checked, the size of the file on my desktop is 4kb, according to https://mvpshostsnews.blogspot.com/ the new file is 400 Kb !
     
  13. davews

    davews Registered Member

    Joined:
    Apr 8, 2014
    Posts:
    20
    I have used MVPS for years and update occasionally - currently a few months old. I have not noticed any issues with slowdowns (W10). I used to have UBlock as well but found it didn't really do anything that MVPS can't.
     
  14. summerheat

    summerheat Registered Member

    Joined:
    May 16, 2015
    Posts:
    1,628
    I'm sorry but this is simply a wrong impression. Stefan and myself provided examples above which cannot be blocked by a hosts file - and you can find this kind of ads on many sites. Secondly, ads/annoyances which can only be dealt with Element Hiding Filters (or Cosmetic Filters as uBO puts it) are not blockable by a hosts file at all.
     
  15. Brummelchen

    Brummelchen Registered Member

    Joined:
    Jan 3, 2009
    Posts:
    2,823
    @Fly - i am using my list in many windows here - but in win 7/8 you have to disable the dns service - that one is slowing you down. for win10 i must have a look, dont know. the dns service is only a local dns provider within windows, my router is performing the request finally (dns relay/cache), and firefox has its own dns cache.
    using my provider and 1.1.1.1 in router, and firefox should have used 9.9.9.9 but i think i have changed, dammit

    DOH
    network.trr.uri;https://mozilla.cloudflare-dns.com/dns-query

    https://wiki.mozilla.org/Trusted_Recursive_Resolver
     
  16. Fly

    Fly Registered Member

    Joined:
    Nov 1, 2007
    Posts:
    2,201
    @Brummelchen ,

    Is that the DNS Client service ? Currently I have it enabled on Windows 7 with a working albeit old HOSTS file. I'm not sure about any disadvantages ? It's working fine as it is ...
     
  17. Brummelchen

    Brummelchen Registered Member

    Joined:
    Jan 3, 2009
    Posts:
    2,823
    the bigger the hosts file the slower dns service performs and consum cpu power. for me 61k entries. (2megs)

    an old hosts file is pointless.

    reading this page will answer you all questions about perfoamance and more - and tools
    http://winhelp2002.mvps.org/hosts.htm

    the linked hosts file editor or hostsman (freeware) can work with several lists

    additional http://www.hosts-file.net/

    hosts file for me is a basic protection against adware and some more advertising sites. i also could use adguard premium but for reason hosts file is enough and the rest is filtered with ublock in browser here. a layered block.
     
  18. Fly

    Fly Registered Member

    Joined:
    Nov 1, 2007
    Posts:
    2,201
    @Brummelchen ,

    Well, with all due respect I rarely see and ad and since I don´t use any particular ad blockers I´m inclined to say it suffices.
     
    Last edited: Dec 26, 2018
  19. Nanobot

    Nanobot Registered Member

    Joined:
    Jun 23, 2010
    Posts:
    381
    Location:
    Neo Tokyo
  20. summerheat

    summerheat Registered Member

    Joined:
    May 16, 2015
    Posts:
    1,628
  21. Nanobot

    Nanobot Registered Member

    Joined:
    Jun 23, 2010
    Posts:
    381
    Location:
    Neo Tokyo
    Whether he stealing, plagiarizing, or whatever else he's doing is also irrelevant, in this case he's right regarding HOSTS adblocking and Pi-hole.
     
  22. summerheat

    summerheat Registered Member

    Joined:
    May 16, 2015
    Posts:
    1,628
    No, he‘s not.
    1. Yes, Pi-hole understands regexes (and I‘m using some of them with it personally). But by default it uses hosts files only - and the filter effectiveness is still excellent.
    2. There have been threads on discourse.pi-hole.net in which users tried to reduce the size of the blocklists with regexes but the reduction was far from the 80% claimed by CK.
    3. Using too many regexes has a detrimental effekt on network performance. Wladimir Palant detected this years ago when he was still developping Adblock Plus, and @gorhill confirmed his findings for uBO.

    Having said that, it‘s undeniable that using hosts files has its disadvantages - see the posts from @Stefan Froberg and myself above. But CK is confirming his incompetenxe by throwing the baby out with the bathwater.
     
  23. Nanobot

    Nanobot Registered Member

    Joined:
    Jun 23, 2010
    Posts:
    381
    Location:
    Neo Tokyo

    Yes, he is. and you are unnecessarily pedantic.
     
  24. summerheat

    summerheat Registered Member

    Joined:
    May 16, 2015
    Posts:
    1,628
    Well, being pedantic is sometimes necessary to counter sweeping arguments ;)

    Besides, what I wrote is confirmed by a recent post from one of the Pi-hole developers.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.