Hosts (file)

The hosts file (for Unix-like operating systems "hosts" written; English for " hosts " or "host" ) used is a local text file, which today usually for the fixed assignment of host names to IP addresses in local computer networks (LAN) will. The system file has been originally used in place of the Domain Name System.

History

The format of the hosts file is originally from the Berkeley Software Distribution, with the UNIX version 4.3, which is in communication with the network stack developed there. Later, it was assumed for various other operating systems.

From that time, the filename lmhosts, what is the abbreviation for "Lan Manager Hosts" and was used on Windows systems from the LAN Manager and later also of the SMB Samba software.

Before the introduction of the Domain Name System (DNS ) host names were resolved on the internet about these hosts files. The distribution and updating of these files, however, was a logistical problem. Therefore, hosts files on the Internet and in larger networks are rare nowadays no longer used to. Also loopback addresses not need an entry in the hosts file nowadays.

Technical details

If a host name to an IP address (or vice versa) translates (or "dissolved" ), so is tried first with operating systems, perform the name resolution locally based on the mappings stored in the Hosts file before other methods (DNS, WINS, be tried, etc.). In unix -like systems, the order is defined by entries in the / etc / nsswitch.conf file.

In no more DOS - based Windows versions (from Windows NT), the file is usually no longer needed, since their task normally takes over the Windows name server service in today's current operating system versions.

Paths on different operating systems

File Format

The file consists of a tabular list of IP addresses and associated hostnames. The columns are separated by spaces or tabs. A typical hosts file looks like this:

# Comments are preceded by a prefix hash 127.0.0.1 localhost.localdomain localhost :: 1 ip6 - localhost ip6 -loopback FE00 :: 0 ip6 - localnet ff00 :: 0 ip6 - mcastprefix ff02 :: 1 ip6 - allnodes ff02 :: 2 ip6 - allrouters ff02 :: 3 ip6 - allhosts The first line is used to assign the local host in the IPv4 protocol, the following lines assign IPv6 addresses.

It should be noted that each sub- domain must be listed, because if not the entry is not present, it will be dissolved.

Uses

Hosts files make it possible to securely associate a DNS entry of an IP address, which for example allows the unambiguous assignment and use in a network with multiple assigned the same name. Also, computers that have different, possibly unfavorable or missing name, a simple and accurate unidentified name can be given. The use of the hosts file can therefore compensate for a temporary failure of the DNS server. There is also the possibility of using a redirect to the loopback interface (host name localhost, the IP address 127.0.0.1) to block addresses. The request will be answered by a specific domain name, such as example.com to point to the address of your own PC. Since there does not exist the requested page, you get a page load error.

Web developers also often carry a domains for which they are designing content. Thus, the contents of the local web server can be tested as if they were on a web server with Selbiger domain on the Internet. The domain is only accessible locally. A processing of scripts and tasks is as with the later name immediately possible.

Use as a filter

Sometimes the hosts file is used to block known ad server by being registered as an alias for 127.0.0.1. The particularity of this method over the advertising to install filters is that this blocking has system-wide validity, ie it is not only limited to a browser. Moreover, one can also use such filters against some malicious programs if these instructions are trying to retrieve from already known servers.

The excessive use of this file, however, can slow down the whole process of name resolution, as this file is not optimized for large amounts of data. Prefabricated files for use as a promotional filter or DNS replacements are available on the internet.

Abuse

Especially Windows operating systems are often the target of viruses which modify the hosts file so that users are directed to fake online services. This trick can be about a user can be redirected to a fake online banking site (see pharming and phishing). If in doubt, it is advisable to pay attention to encrypted connections, as well as to verify the certificate of the link key.

This is usually accompanied by entries, stop the updating of anti-virus programs. The manufacturer's server they reach through their Internet addresses to these servers with the updated virus signatures are provided. Are due to the in the hosts file with invalid or incorrectly entered IP addresses, not to achieve this, these entries thus prevent the automatic or manual updating of the software. By up-dated and properly configured security software ( user account active background guard, active firewall ) should, however, be such manipulations prevent beforehand.

Another ( consciously desired ) method of manipulation has been specially developed by creators of software black copies. Since many types of software must be activated online, in the hosts file an entry with the name of the server of the legal software provider is created, with the activation contact is made. This will be provided with only the IP address of a server that the provider of the black copies entertained. In this case they are illegally procured activation key. The manipulation of the file is done with an included software package.

257227
de