pulz
Would you like to react to this message? Create an account in a few clicks or log in to continue.

What is host file and what is the importance of it.

2 posters

Go down

What is host  file and what is the importance of it. Empty What is host file and what is the importance of it.

Post by petro Wed Jan 16, 2008 11:55 pm

The "Hosts" file in Windows and other operating systems is used to associate host names with IP addresses. Host names are the www.yahoo.com addresses that you see every day. IP addresses are numbers that mean the same thing as the www words - the computers use the numbers to actually find the sites, but we have words like www.yahoo.com so humans do not need to remember the long strings of numbers when they want to visit a site.

For instance, the host name for Yahoo! is www.yahoo.com, while its IP address is 204.71.200.67 Either address will take you to Yahoo!'s site, but the www address will first have to be translated into the IP address. If you type in the IP address directly, your computer will not have to look it up.

A series of steps are used when searching for IP addresses that go with these host names. The first step, and the one that concerns us here, is the hosts file on your local computer. The Hosts file tells your computer what the name is in numbers so the computer can go find it. If the IP address is found in your Hosts file, the computer will stop looking and go to that site, but if it is not it will ask a DNS computer (domain name server) for the information. Since the search ends once a match is found, that provides us with a mechanism to block sites we have no interest in. You may block sites that serve advertisements, sites that serve objectionable content, or any other site that you choose to block.

We can put names and addresses into the Hosts file so your computer does not have to ask a DNS server to translate the domain name into an IP number. This speeds up access to the host site you want to see because your computer no longer has to query other systems on the Internet for the address translation. When you type in a web address like www.yahoo.com, the host name portion of the web address is translated into an IP address before the site is accessed. If you put Yahoo!'s host and IP settings into your Hosts file, it would load a little quicker because your computer doesn't have to ask another to translate where to look for Yahoo!

Computers have a host address of their own - it is known as the "localhost" address, with an IP address of 127.0.0.1 which it uses to refer to itself. If you associate another computer's host name with your localhost IP address, you have effectively blocked that host since all attempts to access it will lead back to you. That is how we will block sites using the Hosts file. We will tell our computer that the IP address of the site we want to block is our own address. That way, our computer will not ever leave and go looking for the site we are blocking - which keeps that site from appearing because the computer thinks it has found the site and displayed it already.

Many web sites have links to other servers for the retrieval of advertisements. In the case of those web servers, the browser will quickly fail to locate the requested data (scripts, images, etc.) from the advertising server because we told our computer to look for the information on itself - of course it won't find any of it and will quit looking for it - and will continue loading the pertinent portions of the page you want to see. This will keep your computer from even talking to the ad servers, and thus you won't see the ads, they can't put cookies on your hard drive, and you can't be profiled by them

petro

Posts : 6
Join date : 2007-12-20

Back to top Go down

What is host  file and what is the importance of it. Empty Location of host file in OS

Post by Admin Wed Jan 16, 2008 11:59 pm

Location of host file in XP is c:\windows\system32\drivers\etc
Windows NT/2000/XP/Vista: %SystemRoot%\system32\drivers\etc\ is the default location, which may be changed. The actual directory is determined by the Registry key \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DataBasePath.
Windows 95/98/Me: %WinDir%\
Linux and other Unix-like operating systems: /etc
Mac OS 9 and earlier: System Folder: Preferences or System folder (format of the file may vary from Windows and Linux counterparts)
Mac OS X: /private/etc (uses BSD-style Hosts file)
OS/2 and eComStation: "bootdrive":\mptn\etc\
Symbian 1st/2nd edition phones: C:\system\data\hosts
Symbian 3rd edition phones: C:\private\10000882\hosts, only accessible with file browsers with AllFiles capability, most are not

It is an important target of viruses

Admin
Admin

Posts : 14
Join date : 2007-12-13

https://pulz.board-directory.net

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum