Where is the documentation that states TCP and UDP source port should be over 1024 and random?

You are probably looking for RFC 6056 – Recommendations for Transport-Protocol Port Randomization
(“Best Current Practice”).

Technically there is no requirement that the ephemeral port be >1024 or random (you could build a system that always initiates connections from port 12 because you like the number 12), it’s just not “normal” to do so (and an awful idea for a bunch of reasons, some of which are described in that RFC).

Leave a Comment