Welcome, Guest. Please login or register.

Author Topic: HOSTS file ignored by IE6!!!  (Read 5052 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline GlaucusTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4518
    • Show all replies
    • http://members.shaw.ca/mveroukis/
HOSTS file ignored by IE6!!!
« on: April 26, 2004, 12:48:22 AM »
This is really bizzare!  I setup an apache web server on my WinXP machine. I can access it fine if I enter my IP address in IE6's address bar. If, however, I access it using "mike-xp", it fails, giving me a 502 - Bad Gateway error. In my hosts file I entered the following line:
192.168.1.100 mike-xp

That's my machine's IP address. When I load NetInfo and Lookup mike-xp, it gives me 192.168.1.100. However, if I go into NetInfo's HTML tab I get the same BAD GATEWAY error I get from IE6 - which tells me it's not just IE6 that's being screwy, something seems wrong at the TCP/IP level.

This used to work before, but I'm not sure what I may have changed to cause this... Could the IP addresses be cached? I'm not using a proxy, so that shouldn't be it (even if it were, that wouldn't explain this behaviour).

Also, in my hosts file I have a ton of ad servers to be blocked out. The ads are not blocked at all when I'm using IE6, yet if I lookup the ad servers on NetInfo I get 127.0.0.1. :-? What the heck is going on?!? Is there an option to by-pass the HOSTS file when using IE6? I must have accidently set that (or some other software has). I ran AdAware, SpyBot Search & Destroy and PestPatrol, but all they found were a few cookies. My virus software hasn't reported anything either. I'll have to run Hijack this again and really analyze the output, but was wondering if anyone had any idea what might be causing this...

Otherwise, my internet is working fine!

  - Mike
YOU ARE NOT IMMUNE
 

Offline GlaucusTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4518
    • Show all replies
    • http://members.shaw.ca/mveroukis/
Re: HOSTS file ignored by IE6!!!
« Reply #1 on: April 26, 2004, 02:24:21 AM »
Quote

Argo wrote:
In your network settings did you define a default gateway?

Ummm...  I don't think so. When I look at my Network Connection Details I see this:
IP Address: 192.168.1.100
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1
DHCP Server: 192.168.1.1
DNS Servers: 64.59.176.13 & 64.59.176.15
WINS Server is blank

192.168.1.1 is my router's IP address, which is connected to my cable modem. In my Internet Protocol (TCP/IP) Properties settings I have it set to automatically obtain the IP address and the DNS servers from DHCP (which would be my router in this case). So that all seems fine, right?

Quote
Did you change any of your network setting or physical network layout?
Nope, I don't think so.

Quote
Do you have other computer on a network? If so can they access that computer by name?
Yes, I do actually, and both computers can access each other by name without problem. And just for fun, I tried to access the apache server on mike-xp from my other XP machine (which has a similar hosts file) using http://mike-xp, and it worked! However, http://mike-xp still gives me the Bad Gateway when I do it on my (mike-xp) machine.

So it really does seem like my hosts file is being ignored!

Quote
In your httpd.conf, what do you have for servername?
ServerName mike-xp:80

But I don't think apache has anything to do with it, and in fact, the real reason I'm even looking into this is because I noticed that ads on websites are no longer being blocked by my hosts file. For example, the line 127.0.0.1 ad.doubleclick.net is entered in my hosts file, yet all ads from that server show up consistantly. At first I thought it was a cache problem, but I flushed them several times now.

The only thing I can think of is that I used one of those "registry cleaner" tools, and it's possibly it accidently removed something from my registry that it shouldn't have. Of course, I have no idea if that's really the cause or not...  :-(

  - Mike
YOU ARE NOT IMMUNE
 

Offline GlaucusTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4518
    • Show all replies
    • http://members.shaw.ca/mveroukis/
Re: HOSTS file ignored by IE6!!!
« Reply #2 on: April 26, 2004, 07:49:24 AM »
Hey,

I tried a couple of things. 1) I trimmed down my hosts file, just incase there was some strange format error causing it to choke up. Not difference. 2) ipconig /flushdns. No difference.

I tried entering some other bogus URLs, just to see what would happen and to my surprise, I get the same Bad Gateway error. Is that what's supposed to happen when you enter a bad URL? I tried http://www.amigaaa.org and it gave me the same error that I got with mike-xp. Something is screwy...

  - Mike
YOU ARE NOT IMMUNE
 

Offline GlaucusTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4518
    • Show all replies
    • http://members.shaw.ca/mveroukis/
Re: HOSTS file ignored by IE6!!!
« Reply #3 on: April 26, 2004, 07:38:48 PM »
Quote

Jope wrote:
Please reread my reply about proxies and check to see whether you have some defined in your browser's config.
Okay, I tripple checked it, and when I go into Internet Options->Connections->LAN Settings, the Use Proxy Server is unchecked. Unless there's another location where I can check for a proxy, I am not using a proxy and never was.

Now, as for nslookup. I ran it, but I'm not really sure how that thing works. Here's what I get when I run it:

$ nslookup
Default Server:  ns3nr.wp.shawcable.net
Address:  64.59.176.13

>

What does that tell me??? I know that 64.59.176.13 is one of the DN servers at shaw, the other is 64.59.176.15.

Btw, I also cross posted this on www.TweakXP.com, and I've examined a few registry settings as well (DnsPriority & HostsPriority), but they seem to checkout fine.

  - Mike
YOU ARE NOT IMMUNE
 

Offline GlaucusTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4518
    • Show all replies
    • http://members.shaw.ca/mveroukis/
Re: HOSTS file ignored by IE6!!!
« Reply #4 on: April 26, 2004, 07:54:06 PM »
Quote

seer wrote:
It's probably unrelated, but does your PC have more then 1 NIC ? Are there any more gateways defined in those NICs ?
Nope, just the one NIC.

Quote
Also, what happens if you go to http://127.0.0.1 or http//localhost ?

127.0.0.1 gives me this:
Server Error
The following error occurred:
[code=CANT_CONNECT_LOOPBACK] Cannot connect due to potential loopback problems

localhost gives me:
The page cannot be displayed

The strange thing is, if enter localhost twice in a row, the 2nd time it seems to go off searching for it indefinetly, and times out.

Quote
As a last test, hook up another computer on the lan and try to acces the website either bij DNS name or IP adress..
Already did that. The 2nd PC has no problem accessing my machine, either using the IP address or a domain name specified in it's hosts file.

Quote
May not give anything to help, but it's worth to check it just in case..
Well, thanks for trying.  :-)

  - Mike
YOU ARE NOT IMMUNE
 

Offline GlaucusTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4518
    • Show all replies
    • http://members.shaw.ca/mveroukis/
Re: HOSTS file ignored by IE6!!!
« Reply #5 on: April 26, 2004, 08:37:46 PM »
Okay, did the trace route:
$ tracert 127.0.0.1

Tracing route to localhost [127.0.0.1]
over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  localhost [127.0.0.1]

Trace complete.

Mike@mike-xp ~
$ tracert localhost

Tracing route to mike-xp [127.0.0.1]
over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  localhost [127.0.0.1]

Trace complete.

Mike@mike-xp ~
$ tracert mike

Tracing route to mike [192.168.1.100]
over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  mike [192.168.1.100]

Trace complete.


Incase you're wondering, I'm using Cygwin/Bash.

As for my hosts file, I trimmed it down to two entries:
127.0.0.1  localhost
192.168.1.100 mike

I then did an ipconfig /flushdns * ipconfig /displaydns:
$ ipconfig /displaydns

Windows IP Configuration

         mike
         ----------------------------------------
         Record Name . . . . . : mike
         Record Type . . . . . : 1
         Time To Live  . . . . : 602457
         Data Length . . . . . : 4
         Section . . . . . . . : Answer
         A (Host) Record . . . : 192.168.1.100


         1.0.0.127.in-addr.arpa
         ----------------------------------------
         Record Name . . . . . : 1.0.0.127.in-addr.arpa.
         Record Type . . . . . : 12
         Time To Live  . . . . : 602457
         Data Length . . . . . : 4
         Section . . . . . . . : Answer
         PTR Record  . . . . . : localhost


         100.1.168.192.in-addr.arpa
         ----------------------------------------
         Record Name . . . . . : 100.1.168.192.in-addr.arpa.
         Record Type . . . . . : 12
         Time To Live  . . . . : 602457
         Data Length . . . . . : 4
         Section . . . . . . . : Answer
         PTR Record  . . . . . : mike


         localhost
         ----------------------------------------
         Record Name . . . . . : localhost
         Record Type . . . . . : 1
         Time To Live  . . . . : 602457
         Data Length . . . . . : 4
         Section . . . . . . . : Answer
         A (Host) Record . . . : 127.0.0.1

Just get's stranger and stranger doesn't it?

And yes, no proxy, no startup script. It's is however set to Automatically detect settings.

  - Mike
YOU ARE NOT IMMUNE
 

Offline GlaucusTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4518
    • Show all replies
    • http://members.shaw.ca/mveroukis/
Re: HOSTS file ignored by IE6!!!
« Reply #6 on: April 26, 2004, 08:56:34 PM »
Ummm....  I think I fixed it....  Boy do I feel silly now. I unchecked the Automatically detect settings button and all seems to be working fine now!!! So, umm...  I guess IE was detecting the settings all wrong, but I swear I've always had that checked. Strange. Oh well, it seems to be working now. On the plus side, I've learned a great deal about Windows networking! Thanks for all the help guys! :-D

  - Mike
YOU ARE NOT IMMUNE