/etc/hosts file query.

C

Chuck

If i am connected to net through proxy
and i add the following entries in the /etc/hosts file

216.109.118.66 www.somesite.com

Will it go to 216.109.118.66 when i enter www.somesite.com in my
browser.

Rgds,
Sunil

Sunil,

Assuming the "...\etc\hosts" is the file currently configured for use, then yes.
Remember that the location of the hosts file can be configured, and has been
known to be altered by malware installations.
<http://support.microsoft.com/?id=314053>
 
G

Guest

Something that I had to look up a long time ago that has helped me might help
you in this or other instances. When Windows does a name lookup it follows a
certain order:

1. Windows checks to see if the computer you are looking for is itself
2. Windows looks in it's local cache for the computer name
3. Windows checks the hosts file
4. Winodws queries the DNS server
5. Windows will query a WINS server if available
6. Windows will check the LMHOSTS file (this can be preloaded, so it can
show up in the cache, which brings these entries much higher on the list)
7. Windows will broadcast for the name
8. Windows just stops trying.

Once you have loaded the text into the hosts file, you should use 'ipconfig
/flushdns' from the cmd prompt or Run bar to clear the DNS cache.

You can also use 'nbtstat -c' to view the contents of the lmhosts file and
netbios name cache.
 
V

virmanisunil

Surprsingly it is working for local IP's but for external IP's it does
not work.What could be the reason for the same.



Sunil Virmani
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top