I see a weird issue in Redhat9 with iperf 2.1.6 where iperf client is trying to use local port 0 to connect to remote server and it failed because system doesn't allow that. The issue only happens for IPv6 and IPv4 works perfectly fine.
Is there a way to configure iperf2 to use specific local ports above 5000?
# iperf -c 2001::ab:102 -i1 -P10 -V
tcp connect failed: Permission denied
tcp connect failed: Permission denied
tcp connect failed: Permission denied
[ 5] local :: port 0 connected with 2001::ab:102 port 5001
------------------------------------------------------------
Client connecting to 2001::ab:102, TCP port 5001
TCP window size: -1.00 Byte (default)
------------------------------------------------------------
tcp connect failed: Permission denied
[ 4] local :: port 0 connected with 2001::ab:102 port 5001
tcp connect failed: Permission denied
[ 1] local :: port 0 connected with 2001::ab:102 port 5001
[ 6] local :: port 0 connected with 2001::ab:102 port 5001
tcp connect failed: Permission denied
[ 3] local :: port 0 connected with 2001::ab:102 port 5001
tcp connect failed: Permission denied
[ 2] local :: port 0 connected with 2001::ab:102 port 5001
[ 7] local :: port 0 connected with 2001::ab:102 port 5001
tcp connect failed: Permission denied
tcp connect failed: Permission denied
tcp connect failed: Permission denied
[ 8] local :: port 0 connected with 2001::ab:102 port 5001
[ 9] local :: port 0 connected with 2001::ab:102 port 5001
[ 10] local :: port 0 connected with 2001::ab:102 port 5001