esnet / iperf

iperf3: A TCP, UDP, and SCTP network bandwidth measurement tool
Other
6.91k stars 1.28k forks source link

Iperf3/Iperf2 please support SSH/TLS encryption. #1035

Open okudayukiko opened 4 years ago

okudayukiko commented 4 years ago

NOTE: The iperf3 issue tracker is for registering bugs, enhancement requests, or submissions of code. It is not a means for asking questions about building or using iperf3. Those are best directed towards the iperf3 mailing list at iperf-dev@googlegroups.com or question sites such as Stack Overflow (http://www.stackoverflow.com/). A list of frequently-asked questions regarding iperf3 can be found at http://software.es.net/iperf/faq.html.

Context

Please fill out one of the "Bug Report" or "Enhancement Request" sections, as appropriate.

Bug Report

Please submit patches or code changes as a pull request.

Enhancement Request

bmah888 commented 4 years ago

Including TLS support in iperf3 would be a pretty substantial undertaking, given that client programs use OpenSSL with a very different set of library calls, compared to standard sockets.

okudayukiko commented 4 years ago

Including TLS support in iperf3 would be a pretty substantial undertaking, given that client programs use OpenSSL with a very different set of library calls, compared to standard sockets.

TLS can select TLS 1.0-TLS 1.2 cipher and TLS 1.3 cipher. TLS can select CA, Cert, Key, TLS 1.2 ECDH Curve, TLS 1.3 ECDH Group, Verify Client Certificate, OpenSSL engine (especially rdrand). SSH can select Host Key, Key exchange, Cipher, MAC.

okudayukiko commented 4 years ago

Use SSH to encrypt iperf3 example: Server: iperf3 -s -p 5001 Client: ssh -R localhost:5001:server:5001 root@server iperf3 -c localhost -p 5001 (will return error) iperf3 -c 127.0.0.1 -p 5001 (OK) iperf3 -c 127.0.0.1 -p 5001 -R (OK)

Mic92 commented 4 years ago

I added tls support to my fork of iperf: https://github.com/Mic92/iperf-3.7/commit/3ff810a4ab2939454e5c812b4a7218a1cdda2136 It is not doing any authentication is purely meant for benchmarking TLS performance. I don't have any intention on adding this upstream but you can see that not much code would be required to do so as openssl socket api aligns nicely with how iperf use it.

TrekkieCoder commented 1 month ago

I have a forked version of iperf with ssl/tls if anyone needs it.