Live data from Hacker News

Internet Draft: Let 'localhost' be localhost

tools.ietf.org

111–120 of 179 posts

Re: Internet Draft: Let 'localhost' be localhost

#111
post #96
post #89

Earlier quoted context omitted.

I remember in the late 90s running into a "mysterious" problem where www.hotmail.com would fail to load, but hotmail.com (without www.) worked just fine. Spent the better part of a year just remembering to not type "www." until one day they made the domain redirect to the canonical name (breaking both). After asking around a bit, someone showed me where the Windows equivalent of /etc/hosts was, and lo-and-behold, the…

/etc/hosts also seems to work on android https://android.stackexchange.com/a/110483

Only if you've rooted your phone, and $EMPLOYER doesn't let rooted phones access certain resources.

Re: Internet Draft: Let 'localhost' be localhost

#112
post #84

Earlier quoted context omitted.

I agree about getaddrinfo(). Applications should have specified AF_INET to gethostbyname() and then when updating to getaddrinfo(), handle ipv6 correctly or skip it. The IPv4-mapped IPv6 addresses thing is a terrible idea that ends up turned off everywhere it makes a difference. Like all of these "transition" ideas, it tries to help, but it just hurts by causing admins/ops/devs to just make sure ipv6 is off everywher…

Is it fair to say IPv6 has been generally a failure? Or is it too early for that?

All that's needed is for Google to make it factor in search ranking and you can bet that we'll all be finally reading up on ipv6 and how to make it work well on our servers, and testing the hell out of it :-)

Re: Internet Draft: Let 'localhost' be localhost

#113
post #47

Does this mean that an entry in /etc/hosts assigning ip to localhost will be ignored?

Not necessarily. The requirement for applications concerned about security properties of localhost names is that the resolved address is bound to a loopback interface, in order to satisfy the test in section 5.1 of this draft. However, I expect many application developers to mistakenly assume that only 127/8 and ::1 are valid loopback interface addresses.

Or, indeed, to assume (as I did for many years) that only 127.0.0.1 itself is a valid loopback address. I was rather surprised when I looked it up and found that it was the entire 127 block.

Re: Internet Draft: Let 'localhost' be localhost

#114
post #2

If this doesn't happen or takes too long, there's always lacolhost.com and *.lacolhost.com. I own this domain, have registered it out until 2026 and vow that the domain and all subdomains will always redirect to localhost. It's easy to type and easy to remember and should always do a good job of expressing intent of usage.

You're amazing. I hope you're given more power than you already have.

If people use this in production services, he will have much more power over their services.

Re: Internet Draft: Let 'localhost' be localhost

#115
post #28

Why couldn't they just redirect "localhost" at the DNS level to 127.0.0.1?

Well, because that IP isn't what localhost is supposed to be pointed to. It's supposed to point at 127.0.0.1. The IP you mentioned is more likely to be the IP of the router you're connected to. Usually 127.0.0.1 is limited to the computer's internal network via a loopback network interface and `localhost` should be resolving just to that, but this RFC makes it so that no matter what `localhost` will point locally ins…

For context, as the parent has edited their post: the original question was asking why localhost couldn't have a DNS entry for 192.something.

Re: Internet Draft: Let 'localhost' be localhost

#116

First, the lack of confidence that "localhost" actually resolves to the loopback interface encourages application developers to hard-code IP addresses like "127.0.0.1" in order to obtain certainty regarding routing. This causes problems in the transition from IPv4 to IPv6 (see problem 8 in [draft-ietf-sunset4-gapanalysis]). That does remind me of the times I was dealing with weird connection issues in some critical s…

Some genius at my company decided that ~180,000 Windows endpoints needed "localhost" removed from their hosts file, which has resulted in millions of requests per minute for localhost hitting our resolvers just to return 127.0.0.1.

My guess is that it was some hack they tried to disable IPv6, but aside from the insane load it added to the DNS infrastructure, the other result is that if these machines talk to a malicious resolver, their traffic destined for the loopback interface could end up going anywhere and being captured by anyone.

Great job!

Re: Internet Draft: Let 'localhost' be localhost

#117
post #84

Earlier quoted context omitted.

I agree about getaddrinfo(). Applications should have specified AF_INET to gethostbyname() and then when updating to getaddrinfo(), handle ipv6 correctly or skip it. The IPv4-mapped IPv6 addresses thing is a terrible idea that ends up turned off everywhere it makes a difference. Like all of these "transition" ideas, it tries to help, but it just hurts by causing admins/ops/devs to just make sure ipv6 is off everywher…

Is it fair to say IPv6 has been generally a failure? Or is it too early for that?

It's "too needed to fail" - and there's nothing to supplant it.

And it's finally starting to catch on, 10 years late: Google's primary web domains, Facebook, AWS, Comcast and Time Warner cable internet in the US, most LTE cell service in the US.

Re: Internet Draft: Let 'localhost' be localhost

#118
post #14

Earlier quoted context omitted.

Hm, I'm not familiar with that acronym.

It stands for Document Requesting All Faults and Technicalities. (Source: I have a PhD in speaking out of my ass.)

I bet you're an excellent party ventriloquist. ;-)

Re: Internet Draft: Let 'localhost' be localhost

#119
post #11

Can anybody with more knowledge point out techniques that this would break? Are there any software or networking patterns that currently rely on localhost _not_ resolving to the loopback? EDIT: The RFC mentions that MySQL currently differentiates between the two, but that's it.

Hmm I guess people may use IPs other than 127.0.0.1 like 127.0.0.2 for Docker or maybe VPN/VM shenanigans...

This remains valid under the draft.

Re: Internet Draft: Let 'localhost' be localhost

#120
post #55
post #49

Earlier quoted context omitted.

I always have local.my company.com DNS that resolves to 127.0.0.1. I can get a valid cert that way too.

I hope you don't publish that record to the world.

Lots of sites seem to be doing it now. Off the top of my head I know that Box and Spotify both do it.
Post reply on HN