0

I was just wondering, I keep on seeing other posts telling them to either modify hosts/lmhosts/*.sam files. What are these files for, I know they're for networking for windows, but what exactly are they? I', just very curious..

2
Contributors
2
Replies
3
Views
13 Years
Discussion Span
Last Post by oalee
0

The hosts file has it's origins in UNIX. Basically, if you don't have a local DNS server on your network and want to be able to access/ping/etc. other machines by hostname instead of using their IP, you can edit your hosts file and manually add the entries, so name resolution works without a DNS server.

Example hosts file:

# This is my example hosts file.
# I only have 3 machines on my tiny home network..
192.168.0.5 Machine1_hostname
192.168.0.10 Machine2_hostname
192.168.0.15 Machine3_hostname

So now if you ping Machine2 from Machine1, name resolution will appear to take place.

You can also use the hosts file to block certain websites by making them resolve to localhost, which is useful for blocking ad sites (doubleclick, etc.):

127.0.0.1 ads1.doubleclick.net
127.0.0.1 doubleclick.net

and so on. Keep in mind that this is a very simplistic example. Try doing a search on Google for more in-depth examples/tutorials.

0

Thanks...

and so on. Keep in mind that this is a very simplistic example. Try doing a search on Google for more in-depth examples/tutorials.

I'll do this...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.