

Another potential option here is https://www.kernel.org/doc/html/latest/networking/ip-sysctl.html
ip_unprivileged_port_start - INTEGER
This is a per-namespace sysctl. It defines the first unprivileged port in the network namespace. Privileged ports require root or CAP_NET_BIND_SERVICE in order to bind to them. To disable all privileged ports, set this to 0. They must not overlap with the ip_local_port_range.
Default: 1024
This is also per namespace so you could use it in combination with network namespaces if you really wanted to keep privileged ports.
Oops