Port numbers under 1024 are reserved for superuser, so a normal user cannot bind to ports in the range.
And a range of ports that the system will assign random bind requests from can be set in /proc/sys/net/ipv4/ip_local_port_range So I can reserve a range from automatic allocation. But how do I deny access to non-privileged users to a range of ports?
For example I would like to have ports 16000-17000 to be ONLY usable by superuser. Or just increasing the standard 0-1024 to 0-17000 or some arbitrary number I choose. How can I accomplish this?