Host File

In computing, a host file, stored on the computer's filesystem, is used to look up the Internet Protocol address of a device connected to a computer network. The host file describes a many-to-one mapping of device names to IP addresses. When accessing a device by name, the networking system will attempt to locate the name within the host file if it exists. Typically, this is used as a first means of locating the address of a system, before accessing the Internet domain name system. The reason for this is that the host file is stored on the computer itself and does not require any network access to be used, whereas DNS requires access to an external system, which is typically slower.

Location

The host file is located in the following directories for each operating system:

Ad filtering

One useful ability of the host file is that it is capable of ad filtering. This is accomplished by adding a line to the file that contains 127.0.0.1 (home IP) or 0.0.0.0 (no IP). That way, when a internet capable program attempts to access the IP of an advertiser the ad is prevented from appearing. For example, if you wanted to block Doubleclick ads, you could ad the following to your host file:
  127.0.0.1 ad.doubleclick.net 
or
  0.0.0.0 ad.doubleclick.net 

Hijacking

The host file can also be used in malicious ways by the authors of spyware and viruses. It is similar to ad blocking with the host file, but instead of redirecting advertising servers to dummy ones, popular websites are redirected to an advertiser's server. This technique is known as hijacking. The Qhosts trojan hijacked many search engines such as Google and Altavista and redirected them to a site specified by the author. Other malware such as Mydoom.B may just block the user from visiting sites about security and the removal of viruses. These sites included the makers of popular anti-virus software and Microsoft's Windows Update page to make the removal of the software more difficult for novice users.

Restoration of the host file (Windows and Linux)

When a program hijacks the host file, it may be necessary to restore it.
  1. Identify the location of the host file for your operation system
  2. Create a backup copy
  3. Open it with a basic text editor such as Notepad or vi
  4. Remove all entries for the sites which are hijacked. Some may have been added for legitimate programs. Always be sure to back up your host file. By default, most systems will only have the following line:
  127.0.0.1        localhost 
  1. Save the file
  2. Restart your computer (Windows)

External links

 

<< PreviousWord BrowserNext >>
materialization
general staff games club
oro medonte, ontario
pauline collins
sports in india
s matrix
george mcquinn
roger nygard
moroccan wall
keith locke
sathya sai organisation
a hat full of sky
feridun karakaya
hms sceptre (s104)
against all authority
east croydon station
koreatown
dix river
moss valley
sepiadariidae
red river (kentucky)
humayun azad
galaga
list of formula one grands prix
list of time magazine's 100 most influential people of 2004
manual transmission
hms sceptre (1781)
nonce word
moss valley, derbyshire
ulrich graf von brockdorff rantzau
hms sceptre (1802)
hms sceptre (1917)
hms sceptre (p215)
tabernacle (disambiguation)
opisometer
the tabernacle
clock doubling
herod's temple
list of new zealand place names and their meanings
line of succession to the swedish throne
sepiidae
pack up the cats
anna kyoyama
pastured poultry