Results 1 to 10 of 10

Thread: [Windows] Why to make use of HOSTS file?

  1. #1
    Banned

    Join Date
    Feb 2012
    Posts
    2,361
    Thanks
    166
    Thanked 1,206 Times in 607 Posts
    Rep Power
    0
    Reputation
    16631

    Default [Windows] Why to make use of HOSTS file?

    A hosts file, named HOSTS (with no file extension), is a plain-text file used by Windows (as with all operating systems) to map hostnames to IP addresses. It comes with all versions of Windows OS, and it is located in folder \Windows\System32\Drivers\etc .
    If you install Windows then the hosts file is effectively empty:

    # Copyright (c) 1993-2006 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    # 102.54.94.97 rhino.acme.com # source server
    # 38.25.63.10 x.acme.com # x client host

    # localhost name resolution is handle within DNS itself.
    # 127.0.0.1 localhost
    # ::1 localhost


    Important: The hosts file is preferential to DNS. Therefore if a host name is resolved by the hosts file, bypassing DNS, the request never leaves your computer.

    Thus, having a smart hosts file goes a long way towards blocking ads, banners, 3rd party Cookies, 3rd party page counters, web bugs, other irritants and even most hijackers. This occurs within milliseconds.

    To bring this into your attention was the reason why I started this thread.

    For example, to nullify requests to some doubleclick.net servers, means block all files supplied by that DoubleClick Server to the web page you are viewing, you simply add lines as following to your hosts file. This also prevents the server from tracking your movements. Why? ... because in certain cases "Ad Servers" like Doubleclick (and many others) will try silently to open a separate connection on the webpage you are viewing, record your movements then yes ... follow you to additional sites you may visit.

    # block doubleClick's servers
    127.0.0.1 ad.ae.doubleclick.net
    127.0.0.1 ad.ar.doubleclick.net
    127.0.0.1 ad.at.doubleclick.net
    127.0.0.1 ad.au.doubleclick.net
    127.0.0.1 ad.be.doubleclick.net
    # etc...

    Read more .

    How To:

    » A: Prepare Windows

    Since Windows 7 (and Windows 2008 R2), while there are both IPv4 and IPv6 entries for "localhost", both are disabled by being commented out.

    # 127.0.0.1 localhost
    # ::1 localhost

    IPv6 is Windows default.

    If both "localhost" entries are disabled (commented out), localhost will resolve to the ::1 IPv6 address.
    If both "localhost" entries are enabled (active), localhost will still resolve to the ::1 IPv6 address.
    If you only enable the 127.0.0.1 entry for localhost, then you get the proper IPv4 resolution for a ping of localhost.
    Therefore best of all is a belt and suspenders approach to make sure that localhost resolves to 127.0.0.1, while trying not to break other (or future) Windows features by ripping out IPv6. You set a 127.0.0.1 IPv4 address in the hosts file and you modify Windows's registry as

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\servic es\TCPIP6\Parameters]
    "DisabledComponents"=hex:20

    which tells Windows to prefer IPv4 over IPv6

    » B: Download and install a hosts file

    To start with I strongly recommend to use .

    Important: Since Windows 8.1 the localhost resolves to 0.0.0.0. So replace in the hosts file you downloaded all occurrences of 127.0.0.1 with 0.0.0.0.
    If you are running a pre 8.1 Windows, then you have to replace in the hosts file all occurrences of 0.0.0.0 with 127.0.0.1 of course.

  2. The Following 6 Users Say Thank You to jwoegerbauer For This Useful Post:

    Bigfella237 (02-03-14),kevin1341 (01-03-14),lsemmens (02-03-14),tristen (02-03-14),Uncle Fester (05-03-14),viewer (13-03-14)



Look Here ->
  • #2
    Banned

    Join Date
    Feb 2012
    Posts
    2,361
    Thanks
    166
    Thanked 1,206 Times in 607 Posts
    Rep Power
    0
    Reputation
    16631

    Default Block Google analytics with means of HOSTS file

    Google takes particular and exceptional interest in people with heretical views, as illustrated by the fact that people who post subversive material under their google accounts get special treatment, and special requests for identifying information.

    I have reason to believe that Google has anomalously little information on me, possibly because of various fairly routine measures I have taken to limit information gathering on me. Perhaps their information collecting tactics are aimed at the low hanging fruit, the ninety nine percent, because gathering information on privacy oriented people is more trouble for less benefit, and likely to produce more bugs, misinformation, and faked identities, relative to the amount of data gathered. When people are so happy to give away their information, it is perhaps more trouble that it is worth to steal it.

    ===> Google analytics, however, steals it.

    Most sites you go to link to Google analytics, so when you look at a web page on, say, naked nine year old girls, or, even worse, differences between the races and the sexes, your browser executes the Google analytics script file, which is three thousand lines of code, eighteen kilobytes, exercising every security flaw and privacy bug to identify you, and then report to Google what you have been doing, that you went to this page, that you went to this page from that other page, and so on and so forth.

    So even if the web page on gender differences does not link to Google analytics, the next web page you go to may well rat you out, telling Google not only where you are at, but where you have been. And even if your ideology is as pure from thought crime as the driven snow, executing eighteen kilobytes of javascript code over and over again significantly slows your browser and entire computer.

    ===> Redirect browser requests to Google analytics to your local computer

    To get rid of any requests for Google analytics you simply add the following lines to your computer's HOSTS file

    # my Google filters
    127.0.0.1 www .google-analytics. com # block Analytics
    127.0.0.1 google-analytics. com
    127.0.0.1 ssl .google-analytics. com
    127.0.0.1 www. googleadservices. com # block remarketing
    127.0.0.1 googleadservices. com

    In the hosts file these urls must be entered without any spaces.
    Last edited by jwoegerbauer; 02-03-14 at 05:15 AM. Reason: hint in red added

  • The Following 5 Users Say Thank You to jwoegerbauer For This Useful Post:

    Bigfella237 (02-03-14),JasonC (03-03-14),kevin1341 (02-03-14),tristen (02-03-14),viewer (13-03-14)

  • #3
    Senior Member

    Join Date
    Apr 2012
    Location
    14 Wombat Cres, Goanna Heights NSW
    Posts
    1,409
    Thanks
    734
    Thanked 1,154 Times in 578 Posts
    Rep Power
    605
    Reputation
    20643

    Default

    FWIW I pasted in the MVPS Hosts file from the link provided (here is a direct link to the file itself: ) and doing this has quickened the load times on this forum by something like 1000% !!

    I used to have to wait at least five seconds for just about any page on this forum to finish loading (I assume it was all those damn skim links etc.) but after installing the above "Hosts" file it's now almost instantaneous, and as if that wasn't enough, as a bonus I now don't see any advertisements at all!

    I already "Thanks" you jwoegerbauer but I just had to put it into words, I highly recommend pasting in the MVPS Hosts file, I just wish I knew about this years ago...

    Andrew

  • The Following 5 Users Say Thank You to Bigfella237 For This Useful Post:

    jwoegerbauer (02-03-14),lsemmens (02-03-14),tristen (02-03-14),Uncle Fester (05-03-14),viewer (13-03-14)

  • #4
    Senior Member
    Uncle Fester's Avatar
    Join Date
    Jan 2008
    Location
    Commonly found in a pantry or the bottom of a fridge, searching for grains, fermented or distilled
    Posts
    6,417
    Thanks
    2,293
    Thanked 4,421 Times in 2,522 Posts
    Rep Power
    2050
    Reputation
    81918

    Default

    Scroll down on this page:

    to find instructions how to do this on Linux and OS X

    Fantastic. This really liberates the Internet, it is like the good old days.
    Update: A deletion of features that work well and ain't broke but are deemed outdated in order to add things that are up to date and broken.
    Compatibility: A word soon to be deleted from our dictionaries as it is outdated.
    Humans: Entities that are not only outdated but broken... AI-self-learning-update-error...terminate...terminate...

  • The Following 2 Users Say Thank You to Uncle Fester For This Useful Post:

    tristen (05-03-14),viewer (13-03-14)

  • #5
    Senior Member
    Philquad's Avatar
    Join Date
    Jan 2008
    Location
    nelson bay
    Age
    55
    Posts
    3,872
    Thanks
    192
    Thanked 1,305 Times in 783 Posts
    Rep Power
    666
    Reputation
    16938

    Default

    mines blocking the ads
    but they all are 0.0.0.0 & im on win 7 x64
    is that right?
    https://www.facebook.com/philquad68

  • #6
    Senior Member

    Join Date
    Apr 2012
    Location
    14 Wombat Cres, Goanna Heights NSW
    Posts
    1,409
    Thanks
    734
    Thanked 1,154 Times in 578 Posts
    Rep Power
    605
    Reputation
    20643

    Default

    Yep, 0.0.0.0 works for all versions of Windows.

    All this list does is bypass the step of checking with an online Domain Name Server (DNS) to convert the URL you type in ( for example) to the actual address (67.215.236.156 in this case).

    By pointing all the nuisance URLs to a null address (ie 0.0.0.0) it stops them from loading at all.

    To use this list as it was intended, you can also add entries for all the sites you usually visit too, which means your browser will go straight to the site without having to check with a DNS, so to use this forum again as an example, I've added

    "67.215.236.156 austech.info"

    on a new line in my list, although I must say I don't notice any difference in load times myself, it's too quick to tell either way.

    Andrew

  • The Following User Says Thank You to Bigfella237 For This Useful Post:

    viewer (13-03-14)

  • #7
    Banned
    viewer's Avatar
    Join Date
    Jan 2008
    Location
    NSW 2450
    Age
    70
    Posts
    4,410
    Thanks
    1,541
    Thanked 1,959 Times in 929 Posts
    Rep Power
    0
    Reputation
    17479

    Default

    I can find the hosts file ok in win 7 32 bit.
    Do I need to do the MVPS Hosts file thingo, or can I just open the file , and via cut n paste, add it to my existing hosts file?

    Sorry...not real pc savvy.

  • #8
    Senior Member
    Philquad's Avatar
    Join Date
    Jan 2008
    Location
    nelson bay
    Age
    55
    Posts
    3,872
    Thanks
    192
    Thanked 1,305 Times in 783 Posts
    Rep Power
    666
    Reputation
    16938

    Default

    save your original host file somewhere or zip it
    then cut & paste that into the 1 there
    watch the ads disapear
    https://www.facebook.com/philquad68

  • The Following User Says Thank You to Philquad For This Useful Post:

    viewer (13-03-14)

  • #9
    Banned
    viewer's Avatar
    Join Date
    Jan 2008
    Location
    NSW 2450
    Age
    70
    Posts
    4,410
    Thanks
    1,541
    Thanked 1,959 Times in 929 Posts
    Rep Power
    0
    Reputation
    17479

    Default

    Something in one of those hosts files stopped my foxtel go working, with a message popping up to remove ad blocking from the pc.

    Took me a while to work out it was these, and only after removing the new lines in my hosts file, did the Go app work again....grrrr

  • #10
    Administrator
    admin's Avatar
    Join Date
    Jan 2008
    Location
    Victoria
    Age
    56
    Posts
    31,150
    Thanks
    2,238
    Thanked 13,731 Times in 5,823 Posts
    Rep Power
    4553
    Reputation
    165805

    Default

    Quote Originally Posted by jwoegerbauer View Post
    Thus, having a smart hosts file goes a long way towards blocking ads, banners, 3rd party Cookies, 3rd party page counters, web bugs, other irritants and even most hijackers. This occurs within milliseconds.

    To bring this into your attention was the reason why I started this thread.
    And I am bringing to your intention I am deadset sick of people posting shit to block our ads which is the only way we actually (barely) survive here.

    We have lost almost 70% of our income in the last 12 months. But dont worry, there is still a good 30% left to be destroyed before we shut down. Based on current trends and threads like this, maybe you can destroy us totally in 3 months ?


    Closed before I forget my manners, I am sick of reguarly reading this sort of shit.

  • Bookmarks

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •