Linux:network:socket:ip_unprivileged_port_start CAP_NET_BIND_SERVICE

ip_unprivileged_port_start - INTEGER
这个参数定义了,从哪一个port开始是非特权可以使用的port。而特权的port,需要root用户使用,或者需要权限:CAP_NET_BIND_SERVICE 。如果设置为0,就是没有特权port。
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. It may not overlap with the ip_local_reserved_ports range.
默认值: 1024

使用的代码:

int __inet_bind(struct sock *sk, struct sockaddr *uaddr

你可能感兴趣的:(网络,linux,tcp/ip,特权port)