Host Files – local DNS lookup
This is a basic introduction to the host file, how they work, how to block web sites or computers on LAN using a host file etc..
Host file is a text file that the operating system uses to store the IP address of computers having a physical name (or site address). It is located at %SystemRoot%\system32\drivers\etc\ ( %systemroot% is the Windows Root Directory – default C:\WINDOWS ). Its location can be found out from this key in the
\HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\
DataBasePath
The from in which IP and computer name is saved in host file is -
<IP> <COMPNAME>
How it Works : When you enter a web sites address into your browser your system checks whether the corresponding IP address is already in your host file. If present you will be taken to that IP. If it is not present in host file then it is cross checked with a DNS server and IP of the site is found.
Advantages : Almost all the time the DNS server is not near you and also it will take more time to first find out the IP and then goto the address. So if the IP of the web address is present in the host file you are saving time.
How to block sites : Your own system is considered as a server for certain purposes and its name is localhost and its default IP is 127.0.0.1. So if you give any sites address and put 127.0.0.1 as its IP in your host file you are just blocking the site..
Disadvantage : A Trojan or a “Malicious” colleague can alter the host file with the wrong IP so that you may find yourself in a fraud site or getting pissed off every time you go to some site.
And finally as our Windows always do, there is a problem ,while trying to make things easier. If the host file is larger than 135Kb. Its because all host file is in memory this can also affect boot time –
Related posts : (sorted by relevence)
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments
No comments yet.
Leave a comment