On Thu, 2025-08-07 at 01:38 +0000, Grant Edwards wrote:
> According to IANA (and before that ICANN and USC/ISI) port numbers
> from 1024 to 49151 are registerd ports, and are to be used for
> specific protocols. For example ports 2222 and 44818 are registered
> for used by the Ethernet/IP Rockwell PLC protocol.
> 
> Dynamic or ephemeral ports are supposed to be in the range
> 49152-65535.
> 
> Linux defaults to 32768-60999 for ephemeral ports. That clearly
> overlaps with a _lot_ of assigned/registered port numbers in the
> range
> 32786-49151.
> 
> That seems just plain wrong. What am I missing?
> 
> It's simple enough to change the ephemeral range so it doesn't
> overlap
> with registered port numbers, and it looks like I'm going to need to
> do that to avoid possible collisions in a project I'm working on. The
> question is why do I have to do that? The standards are pretty clear.
> Why does Linux default to being broken like that?

its mostly legacy stuff and convention. at the end of the day, a port
is a port is a port. nothing more to it. 

that thing... 1->1023 is true. kernel actually wants you to be root to
bind those ports, but truth be told, all programs drop privileges.
smtp. imap. pop3. to make a few. they dont run as root. they start as
root and then drop privileges. 

so why even have the kernel thing in the first place? tradition.
inertia. 

a port is a port is a port. 

Reply via email to