Live data from Hacker News

Let 'localhost' be localhost

tools.ietf.org

61–70 of 117 posts

Re: Let 'localhost' be localhost

#61
post #40

Earlier quoted context omitted.

I agree with you. There should exist a standardized tld for internal networks that we can use and be sure that no one else has control over. Buying a domain and use a subdomain of that one is not a good workaround. .internal would be nice and is not used by now. I may go write an rfc now :) related discussion: http://serverfault.com/questions/17255/top-level-domain-doma...

What happens as soon as two different organizations want to connect their networks together and they both turn otu to be using the same hijacked TLD? Use a real domain name instead.

> What happens as soon as two different organizations want to connect their networks together and they both turn otu to be using the same hijacked TLD?

Why "hijacked" TLD? It would be a standard TLD.

If two orgs merge, and they both happen to use the same hostnames for some things, like say git.internal, they just refactor those hosts, or merge them since they merge.

Re: Let 'localhost' be localhost

#62
post #5

Maybe someone should standardize internal TLD(s) for corporate and other use cases that would make developers less sad, as at least they have alternatives.

.local ? https://en.m.wikipedia.org/wiki/.local

It would be great if mDNS was reliable enough that you wouldn't need to hack together a private DNS in most cases.

Re: Let 'localhost' be localhost

#63

Maybe someone should standardize internal TLD(s) for corporate and other use cases that would make developers less sad, as at least they have alternatives.

I agree with you. There should exist a standardized tld for internal networks that we can use and be sure that no one else has control over. Buying a domain and use a subdomain of that one is not a good workaround. .internal would be nice and is not used by now. I may go write an rfc now :) related discussion: http://serverfault.com/questions/17255/top-level-domain-doma...

I thought .local was a de-facto standard for this?

Re: Let 'localhost' be localhost

#64
post #39

I have had a number of customers who have broken our applications, which have daemons listening on localhost, by editing their /etc/hosts files and removing the localhost entry. I guess various people edit /etc/hosts to prevent applications from talking to licensing servers, and in the process happen to accidentally blow away the localhost entry (since these customers don't know what they're doing). We had this happe…

While some people might edit their host for nefarious purposes, I think it's wrong to attribute all of it to malice.

Personally, I set the host file to use https://github.com/StevenBlack/hosts in order to block ads on every computers I touch.

I also often use software that manage the host file and ignore the default physical file.

Re: Let 'localhost' be localhost

#67

Maybe someone should standardize internal TLD(s) for corporate and other use cases that would make developers less sad, as at least they have alternatives.

Presumably single-letter TLDs will never be allocated. So you could allocate yourself one of those. Or maybe something with hyphens in not beginning with xn--.

Re: Let 'localhost' be localhost

#68
post #8

I'm not very networking-wise, got a question: is the "local machine" alwyas a well-defined thing? I'm thinking about stuff like where hosts are transparently distributed. Maybe there are systems out there that take advantage of resolving localhost to other than 127.* in order to make applications easy to transparently migrate when scaling servers out, or something?

No, if your application is distributed, you won't be referring to localhost.

And why not?

If we are running distributed services, we know the machine that the code is run on is running. We can even reference this by many languages version of "this" keyword.

localhost is only "this" for IP4/6

Re: Let 'localhost' be localhost

#69
post #57

Earlier quoted context omitted.

I wish whoever owns localhost.org (which resolves to 127.0.0.1) configured it so that *.localhost.org also worked. Would help with the browsers too.

I use 42foo.com which does exactly that.

Thanks! Nice and short, too.

Re: Let 'localhost' be localhost

#70
post #44

Nice! I'm very much in favor of this change. I develop my webserver locally, and it has many subdomains. So I have "www.localhost", "files.localhost", "doc.localhost", etc. I have to add each subdomain to my /etc/hosts file before I can use it, as you can't have wildcards in that file. And even then, if I type a new one into Chromium, it will try and redirect me to a Google search result, unless I prefix the whole th…

I wish whoever owns localhost.org (which resolves to 127.0.0.1) configured it so that *.localhost.org also worked. Would help with the browsers too.

There is also lvh.me
Post reply on HN