Forums
New posts
Search forums
News
Security News
Technology News
Giveaways
Giveaways, Promotions and Contests
Discounts & Deals
Reviews
Users Reviews
Video Reviews
Support
Windows Malware Removal Help & Support
Mac Malware Removal Help & Support
Mobile Malware Removal Help & Support
Blog
Log in
Register
What's new
Search
Search titles only
By:
Search titles only
By:
Reply to thread
Menu
Install the app
Install
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Forums
Security
Guides - Privacy & Security Tips
What's a 'HOSTS' File? How can you use the host file? [ Info ]
Message
<blockquote data-quote="Jack" data-source="post: 6672" data-attributes="member: 1"><p>The hosts file is a computer file used in an operating system to map hostnames to IP addresses. </p><p>Host file used to play a large role before the Domain Name System (DNS) came into existence. In some operating systems like Windows the host file information is more prefered over the Domain Name System (DNS). The hosts file can be directly controlled by local computer's administrator.</p><p></p><p>Bellow is the contents of Windows based system`s Host file:</p><p>[code]# Copyright (c) 1993-2009 Microsoft Corp.</p><p>#</p><p># This is a sample HOSTS file used by Microsoft TCP/IP for Windows.</p><p>#</p><p># This file contains the mappings of IP addresses to host names. Each</p><p># entry should be kept on an individual line. The IP address should</p><p># be placed in the first column followed by the corresponding host name.</p><p># The IP address and the host name should be separated by at least one</p><p># space.</p><p>#</p><p># Additionally, comments (such as these) may be inserted on individual</p><p># lines or following the machine name denoted by a '#' symbol.</p><p>#</p><p># For example:</p><p>#</p><p># 102.54.94.97 rhino.acme.com # source server</p><p># 38.25.63.10 x.acme.com # x client host</p><p></p><p># localhost name resolution is handled within DNS itself.</p><p># 127.0.0.1 localhost</p><p># ::1 localhost</p><p>127.0.0.1 localhost[/code]</p><p></p><p>Bellow is the contents of Linux based system`s Host file:</p><p>[code]127.0.0.1 localhost</p><p>127.0.0.1 User-desktop</p><p></p><p># The following lines are desirable for IPv6 capable hosts</p><p>::1 ip6-localhost ip6-loopback</p><p>fe00::0 ip6-localnet</p><p>ff00::0 ip6-mcastprefix</p><p>ff02::1 ip6-allnodes</p><p>ff02::2 ip6-allrouters</p><p>ff02::3 ip6-allhosts[/code]</p><p></p><p>The location of host file is different in different Operating system.</p><p></p><ul> <li data-xf-list-type="ul">In windows <em>95/98/</em>me the host file is located in <strong> %windir%</strong> and in <em>Windows NT/2000/xp/vista/7</em> it can be found in <strong>%SystemRoot%\system32\drivers\etc\.</strong><br /> </li> <li data-xf-list-type="ul">In <em>Unix based system and Linux</em> the host files is located in <strong>/etc/inet/hosts</strong> or <strong>/etc/hosts</strong> or <strong>/etc/init</strong><br /> </li> <li data-xf-list-type="ul">In <em>Snow Leopard an iOS</em> the host file is located at <strong>/private/etc/hosts</strong>.<br /> </li> <li data-xf-list-type="ul">In <em>Android systems</em> the host file is located in <strong>/system/etc/hosts</strong>.</li> </ul><p></p><p><span style="font-size: 18px"><strong>How can you use the host file?</strong></span></p><p></p><p>You can use host file to map any word or domain to an ip address or to another domain. For instance if you add the line</p><p></p><p>[code]malwaretips.com example.com[/code]</p><p>to the host file what will happen is that when you type example.com in your browser it will open malwaretips.com instead of example.com no matter what the DNS servers returns.</p><p></p><p>Like wise you can also blacklist a domain or server address using this host</p><p></p><p>[code]localhost example.com[/code]</p><p>If you add this line to the host file it will black list example.com, and no application on your computer can connect to the server of example.com.</p></blockquote><p></p>
[QUOTE="Jack, post: 6672, member: 1"] The hosts file is a computer file used in an operating system to map hostnames to IP addresses. Host file used to play a large role before the Domain Name System (DNS) came into existence. In some operating systems like Windows the host file information is more prefered over the Domain Name System (DNS). The hosts file can be directly controlled by local computer's administrator. Bellow is the contents of Windows based system`s Host file: [code]# Copyright (c) 1993-2009 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 handled within DNS itself. # 127.0.0.1 localhost # ::1 localhost 127.0.0.1 localhost[/code] Bellow is the contents of Linux based system`s Host file: [code]127.0.0.1 localhost 127.0.0.1 User-desktop # The following lines are desirable for IPv6 capable hosts ::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[/code] The location of host file is different in different Operating system. [list] [*]In windows [i]95/98/[/i]me the host file is located in [b] %windir%[/b] and in [i]Windows NT/2000/xp/vista/7[/i] it can be found in [b]%SystemRoot%\system32\drivers\etc\.[/b] [*]In [i]Unix based system and Linux[/i] the host files is located in [b]/etc/inet/hosts[/b] or [b]/etc/hosts[/b] or [b]/etc/init[/b] [*]In [i]Snow Leopard an iOS[/i] the host file is located at [b]/private/etc/hosts[/b]. [*]In [i]Android systems[/i] the host file is located in [b]/system/etc/hosts[/b]. [/list] [SIZE=5][b]How can you use the host file?[/b][/SIZE] You can use host file to map any word or domain to an ip address or to another domain. For instance if you add the line [code]malwaretips.com example.com[/code] to the host file what will happen is that when you type example.com in your browser it will open malwaretips.com instead of example.com no matter what the DNS servers returns. Like wise you can also blacklist a domain or server address using this host [code]localhost example.com[/code] If you add this line to the host file it will black list example.com, and no application on your computer can connect to the server of example.com. [/QUOTE]
Insert quotes…
Verification
Post reply
Top