Changes between Version 4 and Version 5 of DnsHosts


Ignore:
Timestamp:
2020-02-07T18:34:22+01:00 (12 days ago)
Author:
AnonymousPoster
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DnsHosts

    v4 v5  
    99In some operating systems, the contents of the hosts file is used preferentially to other name resolution methods, such as the Domain Name System (DNS), but many systems implement name service switches, e.g., nsswitch.conf for Linux and Unix, to provide customization. Unlike remote DNS resolvers, the hosts file is under the direct control of the local computer's administrator
    1010
    11 == File content ==
    12 The hosts file contains lines of text consisting of an IP address in the first text field followed by one or more host names. Each field is separated by white space – tabs are often preferred for historical reasons, but spaces are also used. Comment lines may be included; they are indicated by an octothorpe (#) in the first position of such lines. Entirely blank lines in the file are ignored. For example, a typical hosts file may contain the following:
     11== Hosts File formatting ==
     12The layout for the hosts file formatting is standardized in [rfc:952]
     13
     14
     15== Hosts File content ==
     16The hosts file contains lines of text consisting of an IP address in the first text field followed by one or more host names. Each field is separated by white space – tabs are often preferred for historical reasons, but spaces are also used. Comment lines may be included; they are indicated by an octothorpe (`#`) in the first position of such lines. Entirely blank lines in the file are ignored. For example, a typical hosts file may contain the following:
    1317
    1418{{{#!shell
     
    2529
    2630This example only contains entries for the loopback addresses of the system and their host names, a typical default content of the hosts file. The example illustrates that an IP address may have multiple host names (localhost and loopback), and that a host name may be mapped to both IPv4 and IPv6 IP addresses, as shown on the first and second lines respectively.
     31
     32=== 127.0.0.1 or 0.0.0.0 ===
     33The usage of either `127.0.0.1` or `0.0.0.0` to be used for loopback address to block contents is dependent of which OS and OS:Version you are using.
     34
     35  A rule of thumb is::
     36  * Windows <= 7 should use `127.0.0.1`
     37  * Linux distros loading the hosts file into [[http://www.thekelleys.org.uk/dnsmasq/doc.html|dnsmasq]] should be choosing between both layouts with a weight of +1 to `0.0.0.0` as it would return `NXDOMAIN`
     38  * Everyone else should be using `0.0.0.0`
     39
     40The advantage of using `0.0.0.0` over `127.0.0.1` is that the `0.0.0.0` is a non rout able address and should timeout faster. This is also relate to the timeout issue that will occur if you are running a local web-service on port `:80` and/or `:443`.
    2741
    2842== Location in the file system ==
     
    7690
    7791== Hosts file vs Unbound test ==
    78 In this test I'm going to give you a quick and dirty idea about why the usage hosts file is the worst idea ever for content blocking.
    79 
    80 First of is the hosts file only designed to have a very limited number of records, the second reason is simple the share size of modern hosts files.
     92In this test I'm going to give you a quick and dirty idea about why the usage of hosts file is the worst idea ever for content blocking.
     93
     94First of, the hosts file only designed to have a very limited number of records, the second reason is simply the share size of modern hosts files that will brake almost any non *nix OS, yet the hosts file can be big enough to brake even a Linux Distro.
    8195
    8296Take a Look at these examples of issues where Windows Users simply looses there entire network, do to timeout in loading the hosts file.