Networking Forums

Networking Forums > Network Hardware > Home Networking > xp hosts file

Reply
Thread Tools Display Modes

xp hosts file

 
 
andrew
Guest
Posts: n/a

 
      04-26-2008, 07:25 PM
I'm experimenting with blocking certain sites on my wife's xp sp2 computer,
I wanted to divert all requests to a certain domain to google's ip address
but for some reason the hosts file does not seem to get read on boot up, is
there another service that takes priority over the hosts file?

AJH
 
Reply With Quote
 
 
 
 
deKay
Guest
Posts: n/a

 
      04-26-2008, 08:44 PM
andrew wrote:
> I'm experimenting with blocking certain sites on my wife's xp sp2 computer,
> I wanted to divert all requests to a certain domain to google's ip address
> but for some reason the hosts file does not seem to get read on boot up, is
> there another service that takes priority over the hosts file?


Do you have any anti-spyware, anti-virus or firewall software running?
Some of these intercept host file calls. Some will even let you do what
you're trying to achieve with the hosts file.

deKay
--
Lofi Gaming - http://lofi-gaming.org.uk
Gaming Diary - http://lofi-gaming.org.uk/diary
Blog - http://lofi-gaming.org.uk/blog
My computer runs at 3.5MHz and I'm proud of that
 
Reply With Quote
 
Bernard Peek
Guest
Posts: n/a

 
      04-26-2008, 08:56 PM
andrew wrote:
> I'm experimenting with blocking certain sites on my wife's xp sp2 computer,
> I wanted to divert all requests to a certain domain to google's ip address
> but for some reason the hosts file does not seem to get read on boot up, is
> there another service that takes priority over the hosts file?
>

The hosts file is read when the machine needs to do a DNS lookup rather
than at boot time. Post details of what you are adding to the hosts file
so that we can see what is going wrong.



--
(E-Mail Removed)
 
Reply With Quote
 
Mortimer
Guest
Posts: n/a

 
      04-26-2008, 10:45 PM
"andrew" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm experimenting with blocking certain sites on my wife's xp sp2
> computer,
> I wanted to divert all requests to a certain domain to google's ip address
> but for some reason the hosts file does not seem to get read on boot up,
> is
> there another service that takes priority over the hosts file?


I've found that the hosts file on XP does get read, but on one PC, Internet
Explorer seems to divert to a search page instead of obeying the name to
address translation in the hosts file: I add an entry "router" with the IP
address of my router on all my PCs as this is easier to type when I want to
bring up the router's config pages. Firefox and Opera use the hosts entry
correctly, and IE works fine on the other PCs (XP and W98). I wonder what
has got misconfigured there, becaue it used to work fine.


 
Reply With Quote
 
Rob Morley
Guest
Posts: n/a

 
      04-27-2008, 09:17 AM
In article <yLydnQ-eO9vnLY7VnZ2dnUVZ8q2dnZ2d@plusnet>, Mortimer
(E-Mail Removed) says...
> "andrew" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I'm experimenting with blocking certain sites on my wife's xp sp2
> > computer,
> > I wanted to divert all requests to a certain domain to google's ip address
> > but for some reason the hosts file does not seem to get read on boot up,
> > is
> > there another service that takes priority over the hosts file?

>
> I've found that the hosts file on XP does get read, but on one PC, Internet
> Explorer seems to divert to a search page instead of obeying the name to
> address translation in the hosts file: I add an entry "router" with the IP
> address of my router on all my PCs as this is easier to type when I want to
> bring up the router's config pages. Firefox and Opera use the hosts entry
> correctly, and IE works fine on the other PCs (XP and W98). I wonder what
> has got misconfigured there, becaue it used to work fine.
>

Sounds like you've picked up a "Browser Helper Object" from something
you've installed on the machine. Run a spyware/adware scanner to
identify it. Most can be removed manually without problems.
 
Reply With Quote
 
sylva@despammed.com
Guest
Posts: n/a

 
      04-27-2008, 11:51 AM
On Sat, 26 Apr 2008 21:56:59 +0100, Bernard Peek <(E-Mail Removed)>
wrote:

>The hosts file is read when the machine needs to do a DNS lookup rather
>than at boot time. Post details of what you are adding to the hosts file
>so that we can see what is going wrong.



I thought it was read at boot up and the table looked up before the
dns was called.

Anyway I added the last line to her hosts file in
system32/drivers/etc:
*************
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host
name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost
64.233.183.147 bbc.co.uk
************

Just to see if I could divert get calls to bbc.co.uk to google

It simply did nothing, I am posting from her pc and it has both Kerio
and a very out of date Kapersky virus scanner running.

AJH

 
Reply With Quote
 
news@syslva.icuklive.co.uk
Guest
Posts: n/a

 
      04-27-2008, 12:49 PM
On Sun, 27 Apr 2008 12:51:42 +0100, (E-Mail Removed) wrote:

>I am posting from her pc


Which is why the from address was a very old one!

AJH

 
Reply With Quote
 
LR
Guest
Posts: n/a

 
      04-27-2008, 12:56 PM
(E-Mail Removed) wrote:
> On Sat, 26 Apr 2008 21:56:59 +0100, Bernard Peek <(E-Mail Removed)>
> wrote:
>
>> The hosts file is read when the machine needs to do a DNS lookup rather
>> than at boot time. Post details of what you are adding to the hosts file
>> so that we can see what is going wrong.

>
>
> I thought it was read at boot up and the table looked up before the
> dns was called.
>
> Anyway I added the last line to her hosts file in
> system32/drivers/etc:
> *************
> # Copyright (c) 1993-1999 Microsoft Corp.
> #
> # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
> #
> # This file contains the mappings of IP addresses to host names. Each
> # entry should be kept on an individual line. The IP address should
> # be placed in the first column followed by the corresponding host
> name.
> # The IP address and the host name should be separated by at least one
> # space.
> #
> # Additionally, comments (such as these) may be inserted on individual
> # lines or following the machine name denoted by a '#' symbol.
> #
> # For example:
> #
> # 102.54.94.97 rhino.acme.com # source server
> # 38.25.63.10 x.acme.com # x client host
>
> 127.0.0.1 localhost
> 64.233.183.147 bbc.co.uk
> ************
>
> Just to see if I could divert get calls to bbc.co.uk to google
>
> It simply did nothing, I am posting from her pc and it has both Kerio
> and a very out of date Kapersky virus scanner running.
>
> AJH
>

The "hosts" file is loaded into "Memory cache" on start up.
Clear your browser cache and then try going to bbc.co.uk
 
Reply With Quote
 
Bernard Peek
Guest
Posts: n/a

 
      04-27-2008, 04:03 PM
(E-Mail Removed) wrote:
> On Sat, 26 Apr 2008 21:56:59 +0100, Bernard Peek <(E-Mail Removed)>
> wrote:
>
>> The hosts file is read when the machine needs to do a DNS lookup rather
>> than at boot time. Post details of what you are adding to the hosts file
>> so that we can see what is going wrong.

>
>
> I thought it was read at boot up and the table looked up before the
> dns was called.
>
> Anyway I added the last line to her hosts file in
> system32/drivers/etc:
> *************
> # Copyright (c) 1993-1999 Microsoft Corp.
> #
> # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
> #
> # This file contains the mappings of IP addresses to host names. Each
> # entry should be kept on an individual line. The IP address should
> # be placed in the first column followed by the corresponding host
> name.
> # The IP address and the host name should be separated by at least one
> # space.
> #
> # Additionally, comments (such as these) may be inserted on individual
> # lines or following the machine name denoted by a '#' symbol.
> #
> # For example:
> #
> # 102.54.94.97 rhino.acme.com # source server
> # 38.25.63.10 x.acme.com # x client host
>
> 127.0.0.1 localhost
> 64.233.183.147 bbc.co.uk
> ************
>
> Just to see if I could divert get calls to bbc.co.uk to google
>
> It simply did nothing,


The problem is that there is no host called bbc.co.uk so the entry is
being ignored. You need an entry for each host, not one for the domain.
Try creating an entry for news.bbc.co.uk and try it again.




--
(E-Mail Removed)
 
Reply With Quote
 
LR
Guest
Posts: n/a

 
      04-27-2008, 04:10 PM
Bernard Peek wrote:
> (E-Mail Removed) wrote:
>> On Sat, 26 Apr 2008 21:56:59 +0100, Bernard Peek <(E-Mail Removed)>
>> wrote:
>>
>>> The hosts file is read when the machine needs to do a DNS lookup
>>> rather than at boot time. Post details of what you are adding to the
>>> hosts file so that we can see what is going wrong.

>>
>>
>> I thought it was read at boot up and the table looked up before the
>> dns was called.
>>
>> Anyway I added the last line to her hosts file in
>> system32/drivers/etc:
>> *************
>> # Copyright (c) 1993-1999 Microsoft Corp.
>> #
>> # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
>> #
>> # This file contains the mappings of IP addresses to host names. Each
>> # entry should be kept on an individual line. The IP address should
>> # be placed in the first column followed by the corresponding host
>> name.
>> # The IP address and the host name should be separated by at least one
>> # space.
>> #
>> # Additionally, comments (such as these) may be inserted on individual
>> # lines or following the machine name denoted by a '#' symbol.
>> #
>> # For example:
>> #
>> # 102.54.94.97 rhino.acme.com # source server
>> # 38.25.63.10 x.acme.com # x client host
>>
>> 127.0.0.1 localhost
>> 64.233.183.147 bbc.co.uk
>> ************
>>
>> Just to see if I could divert get calls to bbc.co.uk to google
>>
>> It simply did nothing,

>
> The problem is that there is no host called bbc.co.uk so the entry is
> being ignored. You need an entry for each host, not one for the domain.
> Try creating an entry for news.bbc.co.uk and try it again.
>
>
>
>

On my XP and vista machines putting his entry into my hosts file does
work and redirects to Google, this was using FF and I didn't try IE.
http://www.bbc.co.uk/
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hosts file McHenry Linux Networking 2 06-08-2006 08:03 PM
hosts file Mike Windows Networking 6 01-08-2005 11:17 PM
Hosts file in win 98 SE LBJ Windows Networking 1 12-10-2003 03:19 AM
hosts file frank neuner Windows Networking 1 10-08-2003 07:31 PM
Hosts file in Win 98 John McLean Windows Networking 2 09-08-2003 12:10 PM



1 2 3 4 5 6 7 8 9 10 11