Ip
Application Stacks Azure

iPerf3 on Ubuntu 24.04 on Azure User Guide

| Product: iPerf3 on Ubuntu 24.04 LTS on Azure

Overview

iPerf3 is the de-facto open-source tool for actively measuring the maximum achievable bandwidth on IP networks. This cloudimg image runs iPerf3 as a hardened systemd service listening on TCP/UDP 5201, so you can spin up a throughput server in any Azure region and measure real TCP and UDP performance from your clients, data centres or other clouds. The server runs under a dedicated unprivileged user and generates a per-VM details file on first boot. Backed by 24/7 cloudimg support.

What is included:

  • iPerf3 running as iperf3.service (a hardened systemd unit) on TCP/UDP 5201
  • A dedicated unprivileged iperf3 system user
  • A per-VM /root/iperf3-server-info.txt written at first boot with the server IP, port and ready-to-paste client commands
  • 24/7 cloudimg support

Prerequisites

An active Azure subscription, an SSH key pair, and a VNet + subnet in the target region. Standard_B2s is a fine starting point; choose a size with higher network bandwidth (e.g. a larger D-series) if you want to measure multi-gigabit throughput. NSG inbound: allow 22/tcp from your management network and 5201 (TCP and UDP) from the networks you will test from.

Step 1 — Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for iPerf3 by cloudimg, and select Create. On Basics pick your subscription, resource group, region and size; under Administrator account choose SSH public key and paste your key; under Inbound port rules allow SSH (22). Then Review + createCreate. Add a rule for 5201 (TCP and UDP) after deployment (Step 2 shows the CLI).

Step 2 — Deploy from the Azure CLI

az vm create \
  --resource-group <your-rg> \
  --name iperf3 \
  --image <marketplace-image-urn> \
  --size Standard_B2s \
  --admin-username azureuser \
  --ssh-key-values ~/.ssh/id_ed25519.pub \
  --vnet-name <your-vnet> --subnet <your-subnet> \
  --public-ip-sku Standard

az vm open-port --resource-group <your-rg> --name iperf3 --port 5201 --priority 1010

Step 3 — Connect to your VM

ssh azureuser@<vm-public-ip>

Step 4 — Confirm the server is running

systemctl is-active iperf3.service
ss -tln | grep ':5201 '
iperf3 --version | head -1

The service reports active, the server listens on port 5201, and the iperf3 version is printed.

Step 5 — Retrieve your server details

The first boot writes a details file with this VM's public IP, port and ready-to-paste client commands:

sudo cat /root/iperf3-server-info.txt

Step 6 — Run a throughput test from a client

On any machine that has iperf3 installed (apt install iperf3, brew install iperf3, or the Windows build), run a download test against the server's public IP. You can confirm the server end-to-end from the VM itself:

iperf3 -c 127.0.0.1 -p 5201 -t 3

From a remote client, replace the address with the VM's public IP:

# download (server -> client)
iperf3 -c <vm-public-ip> -p 5201
# upload / reverse (client -> server)
iperf3 -c <vm-public-ip> -p 5201 -R
# UDP at a target bitrate
iperf3 -c <vm-public-ip> -p 5201 -u -b 100M
# parallel streams for high-bandwidth links
iperf3 -c <vm-public-ip> -p 5201 -P 8

Each run prints per-second throughput and a final sender/receiver summary.

Security and maintenance

iPerf3 has no authentication, so restrict inbound 5201 in your NSG to the specific source networks you test from, and stop the service when you are not actively testing (sudo systemctl stop iperf3). Keep the OS patched with sudo apt update && sudo apt upgrade. The service restarts cleanly with sudo systemctl restart iperf3.

Support

This image is backed by 24/7 cloudimg support. Contact us by email and chat for help with throughput testing, multi-region benchmarking, NSG configuration and tuning.

All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.