Skip to content

A static build of iperf3 to do network testing on remote servers.

License

Notifications You must be signed in to change notification settings

BlindspotSoftware/iperf3-static

 
 

Repository files navigation

iperf3 static builds

Build Platforms

Available architectures

Linux:

  • Arch: amd64 arm32v6 arm32v7 arm64v8 i386 ppc64le riscv64 s390x
  • Docker: yes
  • Static binaries: yes

Windows:

  • Arch: amd64
  • Docker: no
  • Static binaries: yes

MacOS:

  • Arch: amd64 arm64
  • Docker: no
  • Static binaries: yes

Note

Windows and MacOS binaries are not fully static in terms of their dependency and cygwin1.dll (Windows) libSystem.B.dylib (MasOS). They are statically linked with libcrypo.a libssl.a (openssl) and iperf3.a (iperf3) so there should be no other system dependency required to run them on the target hosts.

On Windows openssl is built from Github source to get static libs and on MacOS we get them from the brew cellar installation of openssl@3

Download - Static Binaries

Static binaries for Linux and Windows are available here: https://github.com/userdocs/iperf3-static/releases/latest

Example:

curl -sLo- iperf3 https://github.com/userdocs/iperf3-static/releases/latest/download/iperf3-amd64
chmod +x iperf3
iperf3 --version

Download - Docker

Multiarch Docker images are available via https://github.com/users/userdocs/packages/container/package/iperf3-static

Example:

docker pull ghcr.io/userdocs/iperf3-static:latest

To used the image dynamically

docker run -it ghcr.io/userdocs/iperf3-static:latest iperf3 --version

Alpine multiarch info

Expand for details
Alpine Arch Docker platform arch Source of Build Dockers ghcr.io image
armhf linux/arm/v6 https://hub.docker.com/r/arm32v6/alpine arm32v6/alpine:edge
armv7 linux/arm/v7 https://hub.docker.com/r/arm32v7/alpine arm32v7/alpine:edge
aarch64 linux/arm64 https://hub.docker.com/r/arm64v8/alpine arm64v8/alpine:edge
ppc64le linux/ppc64le https://hub.docker.com/r/ppc64le/alpine ppc64le/alpine:edge
s390x linux/s390x https://hub.docker.com/r/s390x/alpine s390x/alpine:edge
riscv64 linux/riscv64 https://hub.docker.com/r/riscv64/alpine riscv64/alpine:edge
x86 linux/i386 https://hub.docker.com/r/i386/alpine i386/alpine:edge
x86_64 linux/amd64 https://hub.docker.com/r/amd64/alpine amd64/alpine:edge

Windows x86_64 info

Expand for details

Static Cygwin builds created via cygwin64 using this custom installer

https://github.com/userdocs/iperf3-static/blob/master/cygwin-installer.cmd

Generic Build dependencies

Expand for details
apk add build-base pkgconf autoconf automake curl libtool git perl openssl-libs-static openssl-dev linux-headers

Debian linux

apt install -y build-essential pkg-config automake libtool libssl-dev git perl

Cygwin packages

Without openssl

automake,gcc-core,gcc-g++,git,libtool,make,pkg-config

With openssl

automake,gcc-core,gcc-g++,git,libtool,make,pkg-config,libssl-devel,zlib-devel

Generic Build Instructions

Clone the git repo - linux + Cygwin

git clone https://github.com/esnet/iperf.git ~/iperf3 && cd ~/iperf3

Bootstrap - If you cloned the repo

./bootstrap.sh

Configure - linux + Cygwin

Note: Cygwin requires requires compiling openssl and zlib static libs to link statically. Otherwise you compile dynamically

Static

./configure --disable-shared --enable-static-bin --prefix=$HOME

Dynamic

./configure --prefix=$HOME

Cygwin openssl requires compiling openssl and zlib

Build - linux + Cygwin

make -j$(nproc)
make install

Check the linking was done properly

ldd ~/bin/iperf3

Version

Use this command to check the version.

~/bin/iperf3 -v

Will show something like this.

iperf 3.10.1 (cJSON 1.7.13)
Optional features available: CPU affinity setting, IPv6 flow label, TCP congestion algorithm setting, sendfile / zerocopy, socket pacing, authentication, bind to device, support IPv4 don't fragment

Use the static binaries from this repo

Download and install to the bin directory of your local user (for root this may not be in the $PATH)

Pick the platform URL you need:

i386 / x86

mkdir -p ~/bin && source ~/.profile
wget -qO ~/bin/iperf3 https://github.com/userdocs/iperf3-static/releases/latest/download/iperf3-i386
chmod 700 ~/bin/iperf3

amd64

mkdir -p ~/bin && source ~/.profile
wget -qO ~/bin/iperf3 https://github.com/userdocs/iperf3-static/releases/latest/download/iperf3-amd64
chmod 700 ~/bin/iperf3

arm32v6

mkdir -p ~/bin && source ~/.profile
wget -qO ~/bin/iperf3 https://github.com/userdocs/iperf3-static/releases/latest/download/iperf3-arm32v6
chmod 700 ~/bin/iperf3

arm32v7

mkdir -p ~/bin && source ~/.profile
wget -qO ~/bin/iperf3 https://github.com/userdocs/iperf3-static/releases/latest/download/iperf3-arm32v7
chmod 700 ~/bin/iperf3

aarch64 / arm64

mkdir -p ~/bin && source ~/.profile
wget -qO ~/bin/iperf3 https://github.com/userdocs/iperf3-static/releases/latest/download/iperf3-arm64v8
chmod 700 ~/bin/iperf3

ppc64le

mkdir -p ~/bin && source ~/.profile
wget -qO ~/bin/iperf3 https://github.com/userdocs/iperf3-static/releases/latest/download/iperf3-ppc64le
chmod 700 ~/bin/iperf3

s390x

mkdir -p ~/bin && source ~/.profile
wget -qO ~/bin/iperf3 https://github.com/userdocs/iperf3-static/releases/latest/download/iperf3-s390x
chmod 700 ~/bin/iperf3

Windows builds required being bundled with Cygwin dlls to work so these are not single static binaries. They have a directory structure like this.

iperf3.exe
cygwin1.dll

Windows x64 no openssl

https://github.com/userdocs/iperf3-static/releases/latest/download/iperf3-amd64-win.zip

Windows x64 with openssl

https://github.com/userdocs/iperf3-static/releases/latest/download/iperf3-amd64-win-openssl.zip

Check the version:

~/bin/iperf3 -v

MacOS amd64 and arm64 info

Expand for details

amd64 macos-13 intel

mkdir -p ~/bin && source ~/.profile
wget -qO ~/bin/iperf3 https://github.com/userdocs/iperf3-static/releases/latest/download/iperf3-amd64-osx-13
chmod 700 ~/bin/iperf3

arm64 macos-14 apple M1

mkdir -p ~/bin && source ~/.profile
wget -qO ~/bin/iperf3 https://github.com/userdocs/iperf3-static/releases/latest/download/iperf3-arm64-osx-14
chmod 700 ~/bin/iperf3

gh attestation verify

Expand for details

Binaries built from the release of 3.17.1+ use actions/attest-build-provenance

Verify the integrity and provenance of an artifact using its associated cryptographically signed attestations.

https://cli.github.com/manual/gh_attestation_verify

For example:

gh attestation verify iperf3-amd64 -o userdocs

Will give you this result for the release-5.0.0_v2.0.10 revision 1 binary.

Loaded digest sha256:84f9851d0647d3d618c66d64cac10ed1eb37583b3aaf3bb0baac88bf446fb10a for file://iperf3-amd64
Loaded 6 attestations from GitHub API
✓ Verification succeeded!

sha256:84f9851d0647d3d618c66d64cac10ed1eb37583b3aaf3bb0baac88bf446fb10a was attested by:
REPO                    PREDICATE_TYPE                  WORKFLOW
userdocs/iperf3-static  https://slsa.dev/provenance/v1  .github/workflows/alpine_multi.yml@refs/heads/master

Virustotal scanning

Expand for details

All binaries and dlls are scanned by virus total and the results uploaded using this action

https://github.com/crazy-max/ghaction-virustotal

The results url is uploaded to the release body and you can see them here https://github.com/userdocs/iperf3-static/releases/latest

Credits and acknowledgements

Expand for details

Other contributions have helped inspire the creation of a GitHub action for a Windows build and release.

www.neowin.net via budman

https://github.com/ar51an/iperf3-win-builds via cryptanalyst

Forking and using this repo

Expand for details

Step 1: Fork the repo: https://github.com/userdocs/iperf3-static/fork

Step 2: Under the repo /settings/secrets/actions you will need to set a the VT_API_KEY using your

You can find it here if you have created an account: https://www.virustotal.com/gui/my-apikey

Step 3: Under the Actions tab, enable workflows. The check_new_release.yml defaults to a scheduled check but can be run manually.

https://github.com/userdocs/iperf3-static/blob/0571ce60cba18d2b67303b71d31009f83bae36c8/.github/workflows/check_new_release.yml#L11-L12

Test Servers

https://github.com/R0GGER/public-iperf3-servers?tab=readme-ov-file#servers-per-continent

Linux one liner for an example output of ./iperf3 -c speedtest.ip-projects.de for a random Europe server

./$(curl -sL https://db.iperf3serverlist.net/api/v1/db/public/shared-view/b111407c-43c4-48af-a828-301b698064a3/rows/export/csv | awk -F, 'NR>1 { print $1 }' | shuf -n1)

About

A static build of iperf3 to do network testing on remote servers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Batchfile 69.4%
  • Shell 27.9%
  • Dockerfile 2.7%