Jump to content

HOSTS file does nothing?


Recommended Posts

Guest Alex Clark
Posted

Hi all,

 

I edited my hosts file recently to block out a couple of ad-server domains

and noticed it didn't do anything. Curious to test whether my hosts file

worked at all, I directed http://www.google.com to 127.0.0.1 and ran IE. It

promptly loaded http://www.google.com without any bother at all.

 

I rebooted and still had the same issue. It seems the HOSTS file is being

totally ignored. I've Googled for information on it but as far as I can

tell, Windows XP still makes use of this file?

 

I'm on XP Pro 64bit if that makes any difference?

 

TIA,

Alex

  • Replies 14
  • Created
  • Last Reply
Guest Robert L. \(MS-MVP\)
Posted

Re: HOSTS file does nothing?

 

1. Do you have extension on the hosts file, for example hosts.txt?

2. if ping Google.com, do you receive 127.0.0.1?

 

--

Bob Lin, MS-MVP, MCSE & CNE

Networking, Internet, Routing, VPN Troubleshooting on

http://www.ChicagoTech.net

How to Setup Windows, Network, VPN & Remote Access on

http://www.HowToNetworking.com

"Alex Clark" <quanta@noemail.noemail> wrote in message

news:ORf6TrY%23IHA.4472@TK2MSFTNGP05.phx.gbl...

> Hi all,

>

> I edited my hosts file recently to block out a couple of ad-server domains

> and noticed it didn't do anything. Curious to test whether my hosts file

> worked at all, I directed http://www.google.com to 127.0.0.1 and ran IE. It

> promptly loaded http://www.google.com without any bother at all.

>

> I rebooted and still had the same issue. It seems the HOSTS file is being

> totally ignored. I've Googled for information on it but as far as I can

> tell, Windows XP still makes use of this file?

>

> I'm on XP Pro 64bit if that makes any difference?

>

> TIA,

> Alex

>

Guest Bruno
Posted

Re: HOSTS file does nothing?

 

"Alex Clark" wrote:

> I edited my hosts file recently to block out a couple of ad-server domains

> and noticed it didn't do anything. Curious to test whether my hosts file

> worked at all, I directed http://www.google.com to 127.0.0.1 and ran IE. It

> promptly loaded http://www.google.com without any bother at all.

 

The hosts file in is "\WINDOWS\system32\drivers\etc" and has no extension.

Is it the file you've edited?

Guest Ken Blake, MVP
Posted

Re: HOSTS file does nothing?

 

On Fri, 8 Aug 2008 15:33:22 -0400, "Bruno" <bgarbay@yahoo.com> wrote:

> "Alex Clark" wrote:

> > I edited my hosts file recently to block out a couple of ad-server domains

> > and noticed it didn't do anything. Curious to test whether my hosts file

> > worked at all, I directed http://www.google.com to 127.0.0.1 and ran IE. It

> > promptly loaded http://www.google.com without any bother at all.

>

> The hosts file in is "\WINDOWS\system32\drivers\etc" and has no extension.

> Is it the file you've edited?

 

 

And, Alex, exactly how did you edit it? Please copy and paste the line

here.

 

 

--

Ken Blake, Microsoft MVP - Windows Desktop Experience

Please Reply to the Newsgroup

Guest John Wunderlich
Posted

Re: HOSTS file does nothing?

 

"Alex Clark" <quanta@noemail.noemail> wrote in

news:ORf6TrY#IHA.4472@TK2MSFTNGP05.phx.gbl:

> Hi all,

>

> I edited my hosts file recently to block out a couple of ad-server

> domains and noticed it didn't do anything. Curious to test

> whether my hosts file worked at all, I directed http://www.google.com to

> 127.0.0.1 and ran IE. It promptly loaded http://www.google.com without

> any bother at all.

>

> I rebooted and still had the same issue. It seems the HOSTS file

> is being totally ignored. I've Googled for information on it but

> as far as I can tell, Windows XP still makes use of this file?

>

> I'm on XP Pro 64bit if that makes any difference?

>

> TIA,

> Alex

 

It is doubtful that the Hosts file is being ignored.

To test, try creating a new Hosts entry "abc" and assign it the

numeric IP address of, say, yahoo.com. Then try pinging "abc"...

 

A couple of things could cause the behavior you describe.

 

First: Are you accessing the internet through a proxy server? If so,

the proxy server will do the lookups for you.

 

Second: Browsers are sometimes too smart for their own good. It may

have tried "www.google.com", as specified, and it might have failed

because of your Hosts entry. It then might have automatically tried

"google.com" (which is _not_ the same as far as a Host file is

concerned) which probably did work.

 

HTH,

John

Guest Alex Clark
Posted

Re: HOSTS file does nothing?

 

> 1. Do you have extension on the hosts file, for example hosts.txt?

 

Nope, it's just HOSTS and it's in my c:\windows\system32\drivers\etc folder

> 2. if ping Google.com, do you receive 127.0.0.1?

 

Yes! Which tends to imply that IE is doing its own lookup and ignoring the

HOSTS file...?

 

 

 

 

"Robert L. (MS-MVP)" <findemail@chicagotech.net> wrote in message

news:eMi5RzY%23IHA.3344@TK2MSFTNGP04.phx.gbl...

>

> --

> Bob Lin, MS-MVP, MCSE & CNE

> Networking, Internet, Routing, VPN Troubleshooting on

> http://www.ChicagoTech.net

> How to Setup Windows, Network, VPN & Remote Access on

> http://www.HowToNetworking.com

> "Alex Clark" <quanta@noemail.noemail> wrote in message

> news:ORf6TrY%23IHA.4472@TK2MSFTNGP05.phx.gbl...

>> Hi all,

>>

>> I edited my hosts file recently to block out a couple of ad-server

>> domains and noticed it didn't do anything. Curious to test whether my

>> hosts file worked at all, I directed http://www.google.com to 127.0.0.1 and ran

>> IE. It promptly loaded http://www.google.com without any bother at all.

>>

>> I rebooted and still had the same issue. It seems the HOSTS file is

>> being totally ignored. I've Googled for information on it but as far as

>> I can tell, Windows XP still makes use of this file?

>>

>> I'm on XP Pro 64bit if that makes any difference?

>>

>> TIA,

>> Alex

>>

>

Guest Alex Clark
Posted

Re: HOSTS file does nothing?

 

Here are a couple of lines I've added:

 

127.0.0.1 google.com

127.0.0.1 http://www.google.com

 

Pinging either of the above resolves to 127.0.0.1. Surfing via IE takes me

to the Google homepage.

> First: Are you accessing the internet through a proxy server? If so,

> the proxy server will do the lookups for you.

 

I think you've just hit upon the problem - I believe my ISP has some sort of

transparent proxy. So they must be doing the lookup work then, rendering my

HOSTS file irrelevant ya reckon? That's a pain, because I could do with

filtering out a few domains.

 

AHA! Altering the IE connection settings to add a proxy exception for

addresses beginning with *.google.com seems to prevent it loading though!

 

At least that explains it, but I don't fancy having to add a long list of

blacklisted sites to that tiny little textbox in the IE settings. Sounds

like it may be the only solution though :-(

 

Thanks for all your help, and that goes to everyone on this thread.

Alex Clark

 

 

"John Wunderlich" <jwunderlich@lycos.com> wrote in message

news:Xns9AF4828B28wunderpsdrscray@138.126.254.210...

> "Alex Clark" <quanta@noemail.noemail> wrote in

> news:ORf6TrY#IHA.4472@TK2MSFTNGP05.phx.gbl:

>

>> Hi all,

>>

>> I edited my hosts file recently to block out a couple of ad-server

>> domains and noticed it didn't do anything. Curious to test

>> whether my hosts file worked at all, I directed http://www.google.com to

>> 127.0.0.1 and ran IE. It promptly loaded http://www.google.com without

>> any bother at all.

>>

>> I rebooted and still had the same issue. It seems the HOSTS file

>> is being totally ignored. I've Googled for information on it but

>> as far as I can tell, Windows XP still makes use of this file?

>>

>> I'm on XP Pro 64bit if that makes any difference?

>>

>> TIA,

>> Alex

>

> It is doubtful that the Hosts file is being ignored.

> To test, try creating a new Hosts entry "abc" and assign it the

> numeric IP address of, say, yahoo.com. Then try pinging "abc"...

>

> A couple of things could cause the behavior you describe.

>

>

> Second: Browsers are sometimes too smart for their own good. It may

> have tried "www.google.com", as specified, and it might have failed

> because of your Hosts entry. It then might have automatically tried

> "google.com" (which is _not_ the same as far as a Host file is

> concerned) which probably did work.

>

> HTH,

> John

Guest Thee Chicago Wolf
Posted

Re: HOSTS file does nothing?

 

>I edited my hosts file recently to block out a couple of ad-server domains

>and noticed it didn't do anything. Curious to test whether my hosts file

>worked at all, I directed http://www.google.com to 127.0.0.1 and ran IE. It

>promptly loaded http://www.google.com without any bother at all.

>

>I rebooted and still had the same issue. It seems the HOSTS file is being

>totally ignored. I've Googled for information on it but as far as I can

>tell, Windows XP still makes use of this file?

>

>I'm on XP Pro 64bit if that makes any difference?

 

Hi,

 

You can only do so much with that approach. Do you run Firefox or some

clone of Firefox? You should really look into AdBlock Plus. It blocks

the vast majority of bandwidth stealing flash and garbage ads on most

web pages as well as certain ad-related sites. If it can be run on x64

XP, try it out.

 

- Thee Chicago Wolf

Guest Jack \(MVP-Networking\).
Posted

Re: HOSTS file does nothing?

 

Hi

Maybe this can Help, http://www.ezlan.net/host.html

Jack (MS, MVP-Networking)

 

"Alex Clark" <quanta@noemail.noemail> wrote in message

news:ORf6TrY%23IHA.4472@TK2MSFTNGP05.phx.gbl...

> Hi all,

>

> I edited my hosts file recently to block out a couple of ad-server domains

> and noticed it didn't do anything. Curious to test whether my hosts file

> worked at all, I directed http://www.google.com to 127.0.0.1 and ran IE. It

> promptly loaded http://www.google.com without any bother at all.

>

> I rebooted and still had the same issue. It seems the HOSTS file is being

> totally ignored. I've Googled for information on it but as far as I can

> tell, Windows XP still makes use of this file?

>

> I'm on XP Pro 64bit if that makes any difference?

>

> TIA,

> Alex

>

Guest AlmostBob
Posted

Re: HOSTS file does nothing?

 

Clear the TIF

cached pages are loaded from the tif

 

 

--

Adaware http://www.lavasoft.de

spybot http://www.safer-networking.org

AVG free antivirus http://www.grisoft.com

Etrust/Vet/CA.online Antivirus scan

http://www3.ca.com/securityadvisor/virusinfo/scan.aspx

Panda online AntiVirus scan http://www.pandasoftware.com/ActiveScan/

Catalog of removal tools (1)

http://www.pandasoftware.com/download/utilities/

Catalog of removal tools (2)

http://www3.ca.com/securityadvisor/newsinfo/collateral.aspx?CID=40387

Blocking Unwanted Parasites with a Hosts file

http://mvps.org/winhelp2002/hosts.htm

links provided as a courtesy, read all instructions on the pages before use

 

Grateful thanks to the authors and webmasters

_

 

"Alex Clark" <quanta@noemail.noemail> wrote in message

news:ORf6TrY%23IHA.4472@TK2MSFTNGP05.phx.gbl...

> Hi all,

>

> I edited my hosts file recently to block out a couple of ad-server domains

> and noticed it didn't do anything. Curious to test whether my hosts file

> worked at all, I directed http://www.google.com to 127.0.0.1 and ran IE. It

> promptly loaded http://www.google.com without any bother at all.

>

> I rebooted and still had the same issue. It seems the HOSTS file is being

> totally ignored. I've Googled for information on it but as far as I can

> tell, Windows XP still makes use of this file?

>

> I'm on XP Pro 64bit if that makes any difference?

>

> TIA,

> Alex

>

Guest John Wunderlich
Posted

Re: HOSTS file does nothing?

 

"Alex Clark" <quanta@noemail.noemail> wrote in

news:#s0M4OZ#IHA.1224@TK2MSFTNGP02.phx.gbl:

> Here are a couple of lines I've added:

>

> 127.0.0.1 google.com

> 127.0.0.1 http://www.google.com

>

> Pinging either of the above resolves to 127.0.0.1. Surfing via IE

> takes me to the Google homepage.

>

>> First: Are you accessing the internet through a proxy server?

>> If so, the proxy server will do the lookups for you.

>

> I think you've just hit upon the problem - I believe my ISP has

> some sort of transparent proxy. So they must be doing the lookup

> work then, rendering my HOSTS file irrelevant ya reckon? That's a

> pain, because I could do with filtering out a few domains.

>

> AHA! Altering the IE connection settings to add a proxy exception

> for addresses beginning with *.google.com seems to prevent it

> loading though!

>

> At least that explains it, but I don't fancy having to add a long

> list of blacklisted sites to that tiny little textbox in the IE

> settings. Sounds like it may be the only solution though :-(

>

> Thanks for all your help, and that goes to everyone on this

> thread. Alex Clark

>

>

>> HTH,

>> John

 

 

Thanks for the feedback.

-- John

Guest James Egan
Posted

Re: HOSTS file does nothing?

 

 

On Fri, 8 Aug 2008 15:08:28 -0500, "Alex Clark"

<quanta@noemail.noemail> wrote:

>> 1. Do you have extension on the hosts file, for example hosts.txt?

>

>Nope, it's just HOSTS and it's in my c:\windows\system32\drivers\etc folder

>

>> 2. if ping Google.com, do you receive 127.0.0.1?

>

>Yes! Which tends to imply that IE is doing its own lookup and ignoring the

>HOSTS file...?

 

 

c:\windows\system32\drivers\etc is only the "default" location for the

hosts file and an alternate is settable in the registry here.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DataBasePath

 

Some malware will change this location to prevent being blocked by

hosts

 

 

Jim.

Guest Gander
Posted

Re: HOSTS file does nothing?

 

Alex Clark skrev:

> I think you've just hit upon the problem - I believe my ISP has some sort of

> transparent proxy. So they must be doing the lookup work then, rendering my

> HOSTS file irrelevant ya reckon? That's a pain, because I could do with

> filtering out a few domains.

 

A transparent proxy won't interfer with what you are trying to do. Only

a proxy you have entered into the proxy settings in your browser will

bypass your hosts file.

Posted

Re: HOSTS file does nothing?

 

You don't have to enter the proxy settings though. The auto-discover

routine will automatically discover a proxy if the proxy responds

to auto-discovery, and the proxy settings will be filled in from the

auto-discover response.

 

This is not the same as a transparent proxy, this is just a different

way of filling in the proxy settings on your browser.

 

(david)

 

"Gander" <gander@.> wrote in message

news:OVz1Kd6%23IHA.984@TK2MSFTNGP06.phx.gbl...

> Alex Clark skrev:

>

>> I think you've just hit upon the problem - I believe my ISP has some sort

>> of transparent proxy. So they must be doing the lookup work then,

>> rendering my HOSTS file irrelevant ya reckon? That's a pain, because I

>> could do with filtering out a few domains.

>

> A transparent proxy won't interfer with what you are trying to do. Only a

> proxy you have entered into the proxy settings in your browser will bypass

> your hosts file.

Posted

Re: HOSTS file does nothing?

 

> At least that explains it, but I don't fancy having to add a long list of

> blacklisted sites to that tiny little textbox in the IE settings. Sounds

 

 

You can get an IE settings update from the same people who maintain

hosts files. Have a look around the web to see if that is still true. You

just load the file and all the standard bad sites are blocked by your

browser.

 

(david)

 

"Alex Clark" <quanta@noemail.noemail> wrote in message

news:%23s0M4OZ%23IHA.1224@TK2MSFTNGP02.phx.gbl...

> Here are a couple of lines I've added:

>

> 127.0.0.1 google.com

> 127.0.0.1 http://www.google.com

>

> Pinging either of the above resolves to 127.0.0.1. Surfing via IE takes

> me to the Google homepage.

>

>> First: Are you accessing the internet through a proxy server? If so,

>> the proxy server will do the lookups for you.

>

> I think you've just hit upon the problem - I believe my ISP has some sort

> of transparent proxy. So they must be doing the lookup work then,

> rendering my HOSTS file irrelevant ya reckon? That's a pain, because I

> could do with filtering out a few domains.

>

> AHA! Altering the IE connection settings to add a proxy exception for

> addresses beginning with *.google.com seems to prevent it loading though!

>

> At least that explains it, but I don't fancy having to add a long list of

> blacklisted sites to that tiny little textbox in the IE settings. Sounds

> like it may be the only solution though :-(

>

> Thanks for all your help, and that goes to everyone on this thread.

> Alex Clark

>

>

> "John Wunderlich" <jwunderlich@lycos.com> wrote in message

> news:Xns9AF4828B28wunderpsdrscray@138.126.254.210...

>> "Alex Clark" <quanta@noemail.noemail> wrote in

>> news:ORf6TrY#IHA.4472@TK2MSFTNGP05.phx.gbl:

>>

>>> Hi all,

>>>

>>> I edited my hosts file recently to block out a couple of ad-server

>>> domains and noticed it didn't do anything. Curious to test

>>> whether my hosts file worked at all, I directed http://www.google.com to

>>> 127.0.0.1 and ran IE. It promptly loaded http://www.google.com without

>>> any bother at all.

>>>

>>> I rebooted and still had the same issue. It seems the HOSTS file

>>> is being totally ignored. I've Googled for information on it but

>>> as far as I can tell, Windows XP still makes use of this file?

>>>

>>> I'm on XP Pro 64bit if that makes any difference?

>>>

>>> TIA,

>>> Alex

>>

>> It is doubtful that the Hosts file is being ignored.

>> To test, try creating a new Hosts entry "abc" and assign it the

>> numeric IP address of, say, yahoo.com. Then try pinging "abc"...

>>

>> A couple of things could cause the behavior you describe.

>>

>

>>

>> Second: Browsers are sometimes too smart for their own good. It may

>> have tried "www.google.com", as specified, and it might have failed

>> because of your Hosts entry. It then might have automatically tried

>> "google.com" (which is _not_ the same as far as a Host file is

>> concerned) which probably did work.

>>

>> HTH,

>> John

>

>


×
×
  • Create New...