linux本地随机端口范围及预留端口

ip_local_port_range参数定义了Linux服务器上TCP和UDP流量使用的本地端口范围。系统管理员可以设置此参数避免网络层使用特定端口,这些端口可以被明确绑定的应用程序保留。ip_local_reserved_ports则用于指定本地预留端口,不会影响到显式绑定这些端口的应用。
摘要由CSDN通过智能技术生成
  1. The /proc/sys/net/ipv4/ip_local_port_range defines the local port range that is used by TCP and UDP traffic to choose the local port. You will see in the parameters of this file two numbers: The first number is the first local port allowed for TCP and UDP traffic on the server, the second is the last local port number.

本地端口范围:

cat /proc/sys/net/ipv4/ip_local_port_range 
  1. Should the system administrator write a comma-separated list of ports (or ranges of ports denoted by a hyphen) to this parameter, the networking layer will avoid those ports whenever it picks a port number for a new socket. Reserving ports in this manner will not interfere with any application which binds to those ports explicitly.

本地预留端口:

cat /proc/sys/net/ipv4/ip_local_reserved_ports
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值