/etc/hosts file query.



virmanisunil@gmail.com
07-10-2005, 03:00 AM
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

Chuck
07-10-2005, 03:00 AM
On 28 Jun 2005 06:29:05 -0700, *email_address_deleted* wrote:

>
>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>

--
Cheers,
Chuck
http://nitecruzr.blogspot.com/
Paranoia is not a problem - it's a normal response from experience.
My email is AT DOT
actual address pchuck sonic net.

Jason Carter
07-10-2005, 03:00 AM
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.

"Chuck" wrote:

> On 28 Jun 2005 06:29:05 -0700, *email_address_deleted* wrote:
>
> >
> >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>
>
> --
> Cheers,
> Chuck
> http://nitecruzr.blogspot.com/
> Paranoia is not a problem - it's a normal response from experience.
> My email is AT DOT
> actual address pchuck sonic net.
>

virmanisunil@gmail.com
07-10-2005, 03:00 AM
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

Jason Carter wrote:
> 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.
>
> "Chuck" wrote:
>
> > On 28 Jun 2005 06:29:05 -0700, *email_address_deleted* wrote:
> >
> > >
> > >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>
> >
> > --
> > Cheers,
> > Chuck
> > http://nitecruzr.blogspot.com/
> > Paranoia is not a problem - it's a normal response from experience.
> > My email is AT DOT
> > actual address pchuck sonic net.
> >


/etc/hosts file query.