is there any way (tool) in Linux that can be used to reserve all ephemeral ports?
(Linux中有什么方法(工具)可用于保留所有临时端口?)
the reason for this is that I am testing remediation when all outbound ports are in use. (原因是当所有出站端口都在使用时,我正在测试补救措施。)
I've tested apache "ab" but it does not seem there is a way to allocate all outbound ports on the system. (我已经测试过apache“ ab”,但似乎没有办法在系统上分配所有出站端口。)
I am viewing the available ports using the below:
(我正在使用以下方法查看可用的端口:)
first_port=$(cut --fields 1 /proc/sys/net/ipv4/ip_local_port_range)
last_port=$(cut --fields 2 /proc/sys/net/ipv4/ip_local_port_range)
ss --numeric --tcp state connected "( sport >= :$first_port and sport <= :$last_port )"
ask by mohatb translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…