5 ms·
What is port number, if not an identifier of service location?
by unethical_ban 2y ago
What is port number, if not an identifier of service location?
- oasisaimlessly 2y agoUsing port number as a service identifier sucks because it means you can only run e.g. one normally-accessible SSH server per IP address. One potential solution is to look up port numbers via DNS SRV records[1], but very few protocol standards demand clients do this. HTTP and SMTP have their own ad-hoc, partial solutions to this (vhosting, MX records), but most every other service requires a unique IP address per instance. * [1]: https://en.wikipedia.org/wiki/SRV_record https://en.wikipedia.org/wiki/SRV_record
- mistrial9 2y ago"How to Configure SSH for Multiple Ports | Baeldung on Linux March 18, 2024 - Learn how to start an SSH server on multiple ports."
- mmerlin 2y agohttps://www.baeldung.com/linux/ssh-multiple-ports https://www.baeldung.com/linux/ssh-multiple-ports
- akira2501 2y ago> one normally-accessible SSH server per IP address With IPv6 this consideration is almost completely moot. > MX records Have fun with your MX not being port 25. > but most every other service requires a unique IP address per instance. This constant engineering overhead to play to the weaknesses of IPv4 is the problem.
- bandie91 2y ago> Have fun with your MX not being port 25. why? it would be a great spam filter!
- exabrial 2y agoIn the early internet years, your ip address was your identifier. It would have been absurd for your ip address to ever change. That changed quickly. In the early internet years, fixed ports were the service locator. Yet this has not evolved. As another commentor said, you can now only run one instance of a service per IP, which is aburdly wasteful of the possible ~65k inbound ports. TLS and SNI have come up with workarounds, but the root problem is still, port numbers should be available for anything, and we should have a system for service location. DNS is certainly an option, but there are other practical ways to do it.
- moduspol 2y agoSadly it probably won't ever happen because of the numerous packet forwarding layers that have baked-in security expectations that "HTTP = 80" and "HTTPS = 443", etc. It'd still be nice to reach that promised land, but I think the damage has already been done.
- magicalhippo 2y agoI know it's not viable, but yet I've always felt IPv6 would have been a nice opportunity to extinguish port numbers. Just give each service its own IP from the /64 the host was allocated. Then you could have one DNS entry per service. That would have been perfect for residential IPv6 with dynamic prefixes, which require dynamic DNS anyway.
- vel0city 2y agoI've done it on some personal projects recently, what makes it non-viable?
- magicalhippo 2y agoI meant actually getting rid of ports, so the recipient wouldn't need to bother. But I guess one could always just bake it into the DNS record, so perhaps not a big issue in practice.
- 2y ago