|
|
10.3: A possible workaround for accessing localhost
Everyone should understand that localhost is a symbolic name, it is not hardwired into your OS, it is looked up using DNS just like any other symbolic name. Depending on your DNS settings (and your ISP if you have your DNS set to use your ISP's services) localhost may or may not resolve. It is up to the DNS server to have an entry (and reverse entry) for localhost. If that is missing, localhost just plain won't work as you expect.
10.3: A possible workaround for accessing localhost
It is up to the DNS server to have an entry (and reverse entry) for localhost. If that is missing, localhost just plain won't work as you expect. Hopefully not. Every machine that needs TCP/IP name resolution of any sort SHOULD have its own local entry or entries for localhost in whatever local name resolution mechanism it uses. For example, MacOS X has a file at /etc/hosts that is used in single-user mode (and in fact during boot before networking or NetInfo is up) and the default NetInfo entries include localhost entries. Not having such entires locally is a very serious security hole because it would let a DNS server tell you who you are. I have seen people cause serious trouble by removing their local mapping of localhost or making it subsidiary to what DNS says. What is happening with these failures is that at some point whatever process is asking for name resolution is getting back the IPv6 address for the loopback (::1) as the address of 'localhost' and trying to use it for a connection that cannot be made because there is no IPv6 listener for whatever it is trying to connect to. The program SHOULD then look for the other address for localhost (the IPv4 address 127.0.0.1) and connect to that instead, but some (many? most?) programs don't anticipate that particular failure mode and simply fail because the first connection failed. If you want to see proper recovery in action, try 'telnet localhost 22' and note the success (if you have SSH on) then try 'telnet localhost 80' and note the initial failure and then success (if you have the web server running.) |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|