Live data from Hacker News

I Got Sick of Remembering Port Numbers

gregraiz.com

71–80 of 171 posts

Re: I Got Sick of Remembering Port Numbers

#71
post #6

It's like someone should make a file... maybe in /etc ... and put short names for services in it... maybe it could be called /etc/services...

Top reply, and clearly based on the article's title rather than its content, as are the follow-ups. You're making this site worse.

The article is short; go read it then come back and delete.

Re: I Got Sick of Remembering Port Numbers

#72

Earlier quoted context omitted.

> There is no need to come up with "local TLDs" like .vibe, .local, .test and so on -- there is already an industry convention! macOS and most Linux distros support subdomains of localhost, so .localhost works. That would work if your goal was to route traffic to localhost. What if it isn't? There are reasons why the likes of example.com exists.

It looks like this will win: https://en.wikipedia.org/wiki/.internal example.com, and the reserved TLD ".example", exist for technical documentation and writing . If you are writing a comment on HN, or a curriculum for a networking class, then you can discuss "foo.example.com connects to bar.example.com" or "Let's hypothesize about two offices called accounts.example and human-resources.example" The "example" domains…

And there's also .local for mDNS on local network!

I've also come across projects using a public DNS record that points to 127.0.0.1 (something like localtest.me?). IMO that's way worse than using .localhost since you're trusting some rando not to change the DNS records and exfiltrate your meant-to-be-local traffic.

Re: I Got Sick of Remembering Port Numbers

#74
post #71
post #6

It's like someone should make a file... maybe in /etc ... and put short names for services in it... maybe it could be called /etc/services...

Top reply, and clearly based on the article's title rather than its content, as are the follow-ups. You're making this site worse. The article is short; go read it then come back and delete.

[flagged]

Re: I Got Sick of Remembering Port Numbers

#76

I know it's mixing of layers, but I can't help but feel the IPv6 transition missed the boat when they didn't just get rid of ports in the process. They've changed so much else anyway. Want to run another webserver instance or whatever on your computer? Get the OS to allocate a new IP for it. Ports be damned. Could be implemented in a backwards compatible way by requiring all IPv6 TCP/UDP traffic to use a fixed port n…

ipv6 packet does not have any port field. ports are on the level of tcp and udp, and you don't have to use tcp or udp on top of ipv6. ipv4 packet does not have any port information as well.

> ipv6 packet does not have any port field

Yes, that's why I said I know it was mixing of layers.

However ports are a layer violation in a strict sense, introduced as a workaround because there was no easy way to just add thousands of new IPs to a single host back in the IPv4 days. No need to continue a workaround that causes grief on a daily basis.

Re: I Got Sick of Remembering Port Numbers

#77
post #7
post #6

It's like someone should make a file... maybe in /etc ... and put short names for services in it... maybe it could be called /etc/services...

And then they might code up some sort of service lookup tool thingy to use on the train wreck that is the modern web. $ getent services gopher gopher 70/tcp

And if they want name resolution, maybe even names that reflect the scope of its location like .localhost or .internal

Re: I Got Sick of Remembering Port Numbers

#78
post #71
post #6

It's like someone should make a file... maybe in /etc ... and put short names for services in it... maybe it could be called /etc/services...

Top reply, and clearly based on the article's title rather than its content, as are the follow-ups. You're making this site worse. The article is short; go read it then come back and delete.

[flagged]

Re: I Got Sick of Remembering Port Numbers

#79
The file /etc/services maps names to port numbers, like /etc/hosts does for hosts.

E.g. "telnet localhost ssh" takes you to port 22 (not the default 23 for telnet). This works because /etc/services maps "ssh" to "22".

If you're sick of remembering port numbers, create some entries in your /etc/services.

Of course, only programs which use getservbyname to resolve port numbers will accept your names.

Re: I Got Sick of Remembering Port Numbers

#80

Earlier quoted context omitted.

It looks like this will win: https://en.wikipedia.org/wiki/.internal example.com, and the reserved TLD ".example", exist for technical documentation and writing . If you are writing a comment on HN, or a curriculum for a networking class, then you can discuss "foo.example.com connects to bar.example.com" or "Let's hypothesize about two offices called accounts.example and human-resources.example" The "example" domains…

And there's also .local for mDNS on local network! I've also come across projects using a public DNS record that points to 127.0.0.1 (something like localtest.me?). IMO that's way worse than using .localhost since you're trusting some rando not to change the DNS records and exfiltrate your meant-to-be-local traffic.

I did not mention .local, because it is covered in the linked articles: a special-use TLD, reserved for a certain purpose. It has often happened that LAN admins try to name something under ".local" and configure a zone for it in their BIND server. But this is incorrect, because ".local" is already managed by the zeroconf/mDNS protocols. It is a special case; and that is what ".internal" seeks to rectify, by giving y'all a TLD that can be truly internal and truly a zone under DNS server control, whatever that looks like for you.

As for 127.0.0.0/8 in the public DNS: https://utcc.utoronto.ca/~cks/space/blog/sysadmin/HowNotToDo...

As for localnet and localhost in general:

https://utcc.utoronto.ca/~cks/space/blog/sysadmin/LocalhostI...

https://utcc.utoronto.ca/~cks/space/blog/web/LocalhostSurpri...

".vibe" is not a TLD. It is not a registered TLD; it is not a reserved name. It isn't a domain at all. Go ahead, do a WHOIS lookup. Anyone who attempts to use such gibberish, even in documentation, deserves to be rudely surprised, someday in the future.

Post reply on HN