xp hosts file
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
date: Sat, 26 Apr 2008 20:25:27 +0100
author: andrew
|
Re: xp hosts file
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
date: Sat, 26 Apr 2008 21:44:32 +0100
author: deKay lid
|
Re: xp hosts file
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.
--
bap@shrdlu.com
date: Sat, 26 Apr 2008 21:56:59 +0100
author: Bernard Peek
|
Re: xp hosts file
"andrew" wrote in message
news:67hdslF2mc9vlU1@mid.individual.net...
> 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.
date: Sat, 26 Apr 2008 23:45:05 +0100
author: Mortimer
|
Re: xp hosts file
In article <yLydnQ-eO9vnLY7VnZ2dnUVZ8q2dnZ2d@plusnet>, Mortimer
me@privacy.net says...
> "andrew" wrote in message
> news:67hdslF2mc9vlU1@mid.individual.net...
> > 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.
date: Sun, 27 Apr 2008 10:17:35 +0100
author: Rob Morley
|
Re: xp hosts file
On Sat, 26 Apr 2008 21:56:59 +0100, Bernard Peek
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
date: Sun, 27 Apr 2008 12:51:42 +0100
author: unknown
|
Re: xp hosts file
On Sun, 27 Apr 2008 12:51:42 +0100, sylva@despammed.com wrote:
>I am posting from her pc
Which is why the from address was a very old one!
AJH
date: Sun, 27 Apr 2008 13:49:31 +0100
author: unknown
|
Re: xp hosts file
sylva@despammed.com wrote:
> On Sat, 26 Apr 2008 21:56:59 +0100, Bernard Peek
> 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
date: Sun, 27 Apr 2008 13:56:15 +0100
author: LR
|
Re: xp hosts file
sylva@despammed.com wrote:
> On Sat, 26 Apr 2008 21:56:59 +0100, Bernard Peek
> 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.
--
bap@shrdlu.com
date: Sun, 27 Apr 2008 17:03:05 +0100
author: Bernard Peek
|
Re: xp hosts file
Bernard Peek wrote:
> sylva@despammed.com wrote:
>> On Sat, 26 Apr 2008 21:56:59 +0100, Bernard Peek
>> 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/
date: Sun, 27 Apr 2008 17:10:42 +0100
author: LR
|
Re: xp hosts file
On Sun, 27 Apr 2008 17:03:05 +0100, Bernard Peek put finger to
keyboard and typed:
>sylva@despammed.com wrote:
>>
>> 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.
Yes, there is:
bbc.co.uk. 300 IN A 212.58.224.131
Mark
--
Stuff, some of it good, at http://www.good-stuff.co.uk
"Did I tell you it was wine when really it was water?"
date: Sun, 27 Apr 2008 17:12:16 +0100
author: Mark Goodge
|
Re: xp hosts file
LR wrote:
> 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/
Thanks for that, I'll have to run through the other programs on startup and
see which ones may be bypassing the hosts file.
If this is the right track any other suggestions are welcome, my
grandaughter is 12 now so I may find the need to do this in earnest, rather
than as a prank ;-)
AJH
date: Sun, 27 Apr 2008 19:23:58 +0100
author: andrew
|
Re: xp hosts file
andrew wrote:
> LR wrote:
>
>> 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/
>
>
> Thanks for that, I'll have to run through the other programs on startup and
> see which ones may be bypassing the hosts file.
>
> If this is the right track any other suggestions are welcome, my
> grandaughter is 12 now so I may find the need to do this in earnest, rather
> than as a prank ;-)
>
> AJH
Did you try clearing your Browsers "cache" and then trying to see if the
redirection worked?
Are you running a "Proxy Server"? If so you will need to bypass it for
local addresses.
date: Sun, 27 Apr 2008 19:44:06 +0100
author: LR
|
Re: xp hosts file
andrew wrote:
> LR wrote:
>
>> 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/
>
>
> Thanks for that, I'll have to run through the other programs on startup and
> see which ones may be bypassing the hosts file.
>
> If this is the right track any other suggestions are welcome, my
> grandaughter is 12 now so I may find the need to do this in earnest, rather
> than as a prank ;-)
>
The problem is that the hosts files refers to hosts not domains. You
need an entry for each of the servers you want to block.
--
bap@shrdlu.com
date: Sun, 27 Apr 2008 20:17:44 +0100
author: Bernard Peek
|
Re: xp hosts file
On Sun, 27 Apr 2008 19:44:06 +0100, LR wrote:
>Did you try clearing your Browsers "cache" and then trying to see if the
> redirection worked?
Yes
>
>Are you running a "Proxy Server"? If so you will need to bypass it for
>local addresses.
Not to the best of my knowledge!
Pc was inherited.
AJH
date: Sun, 27 Apr 2008 22:55:49 +0100
author: unknown
|
Re: xp hosts file
news@sylva.icuklive.co.uk wrote:
> On Sun, 27 Apr 2008 19:44:06 +0100, LR wrote:
>
>> Did you try clearing your Browsers "cache" and then trying to see if the
>> redirection worked?
>
> Yes
>> Are you running a "Proxy Server"? If so you will need to bypass it for
>> local addresses.
>
> Not to the best of my knowledge!
>
> Pc was inherited.
>
> AJH
>
when you edited the hosts file did you save it as "hosts" or "hosts.txt"?
If "hosts.txt" you will need to rename it back to "hosts" for it to work.
date: Mon, 28 Apr 2008 07:05:54 +0100
author: LR
|
Re: xp hosts file
LR wrote:
> when you edited the hosts file did you save it as "hosts" or "hosts.txt"?
> If "hosts.txt" you will need to rename it back to "hosts" for it to work.
Yes it was correctly saved as just hosts. I'm still floundering around
trying to see why it doesn't work, I think I need to remove some of the
resident processes from start up but I don't often get the opportunity to
mess about with it whilst she's also logged on as a user.
AJH
date: Mon, 28 Apr 2008 21:20:58 +0100
author: andrew
|
Re: xp hosts file
andrew wrote:
> LR wrote:
>
>> when you edited the hosts file did you save it as "hosts" or "hosts.txt"?
>> If "hosts.txt" you will need to rename it back to "hosts" for it to work.
>
> Yes it was correctly saved as just hosts. I'm still floundering around
> trying to see why it doesn't work, I think I need to remove some of the
> resident processes from start up but I don't often get the opportunity to
> mess about with it whilst she's also logged on as a user.
>
> AJH
I have just about run out of ideas as I have nearly covered all the
problems I have encountered. The only other thing I can think of at the
moment is if you have more than 1 "hosts" file then the DNS query is
looking at the wrong file.
date: Tue, 29 Apr 2008 08:39:59 +0100
author: LR
|
Re: xp hosts file
In article , LR
lrme@privacy.net says...
> I have just about run out of ideas as I have nearly covered all the
> problems I have encountered. The only other thing I can think of at the
> moment is if you have more than 1 "hosts" file then the DNS query is
> looking at the wrong file.
>
There can be only one, it is always called 'hosts' and it is always in a
particular (OS-dependant) location.
date: Tue, 29 Apr 2008 10:36:47 +0100
author: Rob Morley
|
Re: xp hosts file
Rob Morley wrote:
> In article , LR
> lrme@privacy.net says...
>
>> I have just about run out of ideas as I have nearly covered all the
>> problems I have encountered. The only other thing I can think of at the
>> moment is if you have more than 1 "hosts" file then the DNS query is
>> looking at the wrong file.
>>
> There can be only one, it is always called 'hosts' and it is always in a
> particular (OS-dependant) location.
One of my relatives edited his hosts file then did a save as instead of
just a save and ended up with "hosts" and "hosts(2)" and all DNS queries
went to "hosts" and his attempts to do redirection failed.
date: Tue, 29 Apr 2008 11:01:58 +0100
author: LR
|
Re: xp hosts file
In article , LR
lrme@privacy.net says...
> Rob Morley wrote:
> > In article , LR
> > lrme@privacy.net says...
> >
> >> I have just about run out of ideas as I have nearly covered all the
> >> problems I have encountered. The only other thing I can think of at the
> >> moment is if you have more than 1 "hosts" file then the DNS query is
> >> looking at the wrong file.
> >>
> > There can be only one, it is always called 'hosts' and it is always in a
> > particular (OS-dependant) location.
> One of my relatives edited his hosts file then did a save as instead of
> just a save and ended up with "hosts" and "hosts(2)" and all DNS queries
> went to "hosts" and his attempts to do redirection failed.
>
As I said, there can be only one, it is always called 'hosts'.
Obviously if you save it with a different name it's not a hosts file.
:-)
date: Tue, 29 Apr 2008 12:44:13 +0100
author: Rob Morley
|
Re: xp hosts file
Rob Morley wrote:
> In article , LR
> lrme@privacy.net says...
>> Rob Morley wrote:
>>> In article , LR
>>> lrme@privacy.net says...
>>>
>>>> I have just about run out of ideas as I have nearly covered all the
>>>> problems I have encountered. The only other thing I can think of at the
>>>> moment is if you have more than 1 "hosts" file then the DNS query is
>>>> looking at the wrong file.
>>>>
>>> There can be only one, it is always called 'hosts' and it is always in a
>>> particular (OS-dependant) location.
>> One of my relatives edited his hosts file then did a save as instead of
>> just a save and ended up with "hosts" and "hosts(2)" and all DNS queries
>> went to "hosts" and his attempts to do redirection failed.
>>
> As I said, there can be only one, it is always called 'hosts'.
> Obviously if you save it with a different name it's not a hosts file.
> :-)
It was saved as hosts but did not overwrite the original hosts file.
date: Tue, 29 Apr 2008 13:04:10 +0100
author: LR
|
Re: xp hosts file
LR wrote:
> The only other thing I can think of at the
> moment is if you have more than 1 "hosts" file then the DNS query is
> looking at the wrong file.
I've definitely saved it correctly and in the right place
(system32/drivers/etc)
I'm thinking that one of the resident programs, kerio, kapersky or spybot,
is affecting this in some way (spybot has an option to turn off the hosts
file). Also there are options in networking that are loaded prior to hosts
(lmhost??). I'm now wondering if something like kerio is in fact a proxy
server as all requests must go through it.
AJH
date: Tue, 29 Apr 2008 21:33:13 +0100
author: andrew
|
Re: xp hosts file
andrew wrote:
> LR wrote:
>
>> The only other thing I can think of at the
>> moment is if you have more than 1 "hosts" file then the DNS query is
>> looking at the wrong file.
>
> I've definitely saved it correctly and in the right place
> (system32/drivers/etc)
> I'm thinking that one of the resident programs, kerio, kapersky or spybot,
> is affecting this in some way (spybot has an option to turn off the hosts
> file).
Spybot has the ability to "Lock" the hosts file into read only mode to
prevent it from being hijacked not turn it off.
It also has a "Hosts file" which can be entered into the windows hosts
file to block a number of known dubious sites. We use this on an XP
machine that everyone has access to.
Also there are options in networking that are loaded prior to hosts
> (lmhost??). I'm now wondering if something like kerio is in fact a proxy
> server as all requests must go through it.
>
> AJH
I have never used kerio so don't know anything about it's settings.
You can check the internet connection settings in your browser to see if
a proxy has been set there.
date: Wed, 30 Apr 2008 08:22:35 +0100
author: LR
|
Re: xp hosts file
In article , LR
lrme@privacy.net says...
> It was saved as hosts but did not overwrite the original hosts file.
>
ITYM someone /attempted/ to save it as 'hosts' ...
date: Wed, 30 Apr 2008 10:13:28 +0100
author: Rob Morley
|
Re: xp hosts file
LR wrote:
> It also has a "Hosts file" which can be entered into the windows hosts
> file to block a number of known dubious sites. We use this on an XP
> machine that everyone has access to.
I've now set it all up in spybot and added both the domain and with the www.
prefix and it is working fine. I don't know what I was previously doing
wrong and having to wait each time till I could reboot her machine made the
job tedious but it's there. Thanks for those that helped.
AJH
date: Wed, 30 Apr 2008 11:22:51 +0100
author: andrew
|