pavement

Hosts

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
(Initial article covering the hosts file)
 
m (Added Jimbo's reference article as a link)
 
(2 intermediate revisions by one user not shown)
Line 10: Line 10:
 
</pre>
 
</pre>
  
Where an IP address is entered on a line followed by a hostname, seperated by a space (several tabs in this example).  It is possible to have several variations of the hostname on the same line.  Also worthy of note is that, despite the historic origin of the hosts file, it can be used to resolve modern day [[IPv6]] (the latest incarnation of traditional IP, IPv4) addresses too.
+
Where an IP address is entered on a line followed by a hostname, seperated by a space (several tabs in this example).  It is possible to have several variations of the hostname on the same line.  Also worthy of note is that, despite the historic origin of the hosts file, it can be used to resolve modern day [[IPv6]] (the latest incarnation of traditional IP, soon to replace IPv4) addresses too.
  
Despite the availability of DNS servers the hosts file can still be useful for blocking advertising sites from your FreeBSD workstation, as [[http://everythingisnt.com/hosts.html this guide]] demonstrates.
+
Despite the availability of DNS servers the hosts file can still be useful for blocking advertising sites from your FreeBSD workstation, as [http://everythingisnt.com/hosts.html this guide] demonstrates.
  
 
It is well documented on the internet that Microsoft used FreeBSD's implementation of TCP/IP for network-enabling their operating systems and the legacy of this may well be apparent even today.  The hosts file is still available on the latest releases including Windows XP and it also resides in C:\Windows\System32\Drivers\'''etc'''\hosts (note the 'etc' in keeping with true Unix configurations).
 
It is well documented on the internet that Microsoft used FreeBSD's implementation of TCP/IP for network-enabling their operating systems and the legacy of this may well be apparent even today.  The hosts file is still available on the latest releases including Windows XP and it also resides in C:\Windows\System32\Drivers\'''etc'''\hosts (note the 'etc' in keeping with true Unix configurations).
 +
 +
See [http://www.kuro5hin.org/?op=displaystory;sid=2001/6/19/05641/7357 this reference] covering Microsoft's use of FreeBSD TCP/IP code.
  
 
[[Category:FreeBSD Terminology]]
 
[[Category:FreeBSD Terminology]]

Latest revision as of 14:58, 18 October 2007

The hosts file originates from the earliest implementations of UNIX when TCP/IP emerged. It was originally used (and still available) for resolving host names to their IP address. Nowadays this form of name resolution is provided by DNS servers.

Located within /etc the hosts file typically contains entries in the following format:

::1                     localhost.example.com localhost
127.0.0.1               localhost.example.com localhost
172.27.0.2              mail.example.com mail
172.27.0.2              mail.example.com.

Where an IP address is entered on a line followed by a hostname, seperated by a space (several tabs in this example). It is possible to have several variations of the hostname on the same line. Also worthy of note is that, despite the historic origin of the hosts file, it can be used to resolve modern day IPv6 (the latest incarnation of traditional IP, soon to replace IPv4) addresses too.

Despite the availability of DNS servers the hosts file can still be useful for blocking advertising sites from your FreeBSD workstation, as this guide demonstrates.

It is well documented on the internet that Microsoft used FreeBSD's implementation of TCP/IP for network-enabling their operating systems and the legacy of this may well be apparent even today. The hosts file is still available on the latest releases including Windows XP and it also resides in C:\Windows\System32\Drivers\etc\hosts (note the 'etc' in keeping with true Unix configurations).

See this reference covering Microsoft's use of FreeBSD TCP/IP code.

Personal tools