Monday 11 February 2019

windows - Hosts File not working correctly


I'm having some issues with my hosts file.


127.0.0.1 localhost
127.0.0.1 whatever
127.0.0.1 sub.localhost
127.0.0.1 example.com

localhost and whatever both work. However the others have weird behaviour.


Ping sub.localhost


c:\>ping sub.localhost
Pinging sub.localhost [127.0.0.1] with 32 bytes of data:

Ping example.com


C:\>ping example.com
Pinging example.com [127.0.0.1] with 32 bytes of data:

All seems ok, but browsing example.com will open the correct example.com page @ 192.0.32.10 which is not the expected behaviour... (obviously sub.localhost wont work at all)


Any ideas why this happens?


UPDATE 1: Removing Proxy Configuration from browser solved it for sub.localhost. example.com however still not working...


UPDATE 2: Some more info...


C:\Documents and Settings\amatos>ping example.com
Pinging example.com [127.0.0.1] with 32 bytes of data:

C:\Documents and Settings\amatos>ping www.example.com
Pinging www.example.com [127.0.0.1] with 32 bytes of data:

C:\Documents and Settings\amatos>nslookup example.com
Server: ac1.-------.pt (# suppose this is the router address...)
Address: 192.168.202.2

Non-authoritative answer:
Name: example.com
Address: 192.0.32.10

Thanks to all that have tried to help so far!



Answer



Is your Web browser using a proxy?


Mine is (I am at work) and when I connect to a Web site it seems to use the address the proxy server thinks, not the address my computer thinks.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...