← Back to Guides Homepage

The Ultimate Guide to iPerf3: Bandwidth Testing on pfSense, Ubuntu, & Windows

iPerf3 is the industry-standard **CLI tool** for active measurements of the maximum achievable **network bandwidth** between different hosts. It is an essential utility for SysAdmins to accurately diagnose and rule out network throughput issues.

Part 1: Installing the iPerf3 Server on pfSense

We will begin by installing the server component on a vanilla pfSense Community Edition firewall. pfSense uses its own package managing system for installation:

The Ultimate Guide to iPerf3: Bandwidth Testing on pfSense, Ubuntu, & Windows

iPerf3 är det industristandardiserade CLI-verktyget för aktiva mätningar...

Part 1: Installing the iPerf3 Server on pfSense

``` Vill du att jag uppdaterar hela koden för **`iperf3-guide.html`** så att du bara kan kopiera och klistra in den (inklusive den nya responsiva CSS:en)?
  1. Log in to the pfSense web interface.
  2. Navigate to **System > Package Manager**.
  3. Go to **Available Packages** and search for iperf.
  4. Find **iperf3** and click the green **Install** button and confirm.

Starting the Server Service

Once installed, you must start the service, which is found under Diagnostics:

  1. Go to **Diagnostics > iperf**.
  2. Select the **Server** mode.
  3. The default port is **5201**. You can specify a different port if needed.
  4. Click the green button to **Run iPerf Server**.

The server will run in the background. You can navigate away from this window without interrupting the test.

Part 2: iPerf3 Client Setup and Testing on Ubuntu Linux

We will now set up the client on a separate Ubuntu Linux machine to run our first test against the pfSense server.

Installation

Open a terminal and install iPerf3 using the package manager:

# Become root and update system
sudo su -
apt update && apt upgrade -y

# Install iPerf3
apt install iperf3 -y

Basic TCP Bandwidth Test

To connect to the iPerf3 server running on pfSense, use the -c (client) flag followed by the server's IP address:

# Replace [SERVER_IP] with the pfSense IP
iperf3 -c [SERVER_IP]

This command performs a default TCP bandwidth test using **one stream** for **10 seconds**.

Enhancing Speed with Parallel Streams

In a realistic scenario (like video streaming or heavy downloads), multiple parallel TCP streams are used. To avoid throttling caused by single-stream limitations (often CPU-related, such as on pfSense), use the -P flag to specify the number of streams (e.g., 10):

iperf3 -c [SERVER_IP] -P 10

Using parallel streams often results in a significantly higher and more realistic bandwidth result (e.g., jumping from 650 Mbits to 1.5 Gbits).

Specifying Test Duration

You can specify how long the test should run using the -t flag (in seconds):

# Runs a test for 15 seconds using 10 parallel streams
iperf3 -c [SERVER_IP] -P 10 -t 15

Part 3: Setting up iPerf3 on Windows Server

The procedure on Windows Server (or any modern Windows system) involves downloading the executable since there is no built-in package manager like apt.

Download and Run

  1. Go to the official iPerf3 GitHub releases page.
  2. Download the standard client zip file (e.g., iperf-*-win64.zip).
  3. Extract the files (EXE and DLL) to a folder.
  4. Open PowerShell or CMD in that directory and run the client test command (the command syntax is identical to Linux):
.\iperf3.exe -c [FIREWALL_IP]

Running Windows as an iPerf3 Server

You can also run the Windows machine in server mode using the -s flag:

.\iperf3.exe -s

⚠️ Important: Windows Firewall Fix

If you attempt to connect to the Windows server from the Linux machine, the connection will likely time out. You must manually allow the default iPerf3 port **5201** in the Windows Firewall.
  1. Open **Windows Defender Firewall with Advanced Security**.
  2. Go to **Inbound Rules** and select **New Rule**.
  3. Choose **Port** > **TCP** > Specific local ports: **5201**.
  4. Select **Allow the connection** and name the rule (e.g., iPerf3 Port 5201).

Part 4: Testing Against Public Mirrors

To measure your true WAN throughput (speed through your home router and ISP), you can test against public iPerf3 mirrors found online. These mirrors often listen on non-default ports.

Example Public Test

To specify a different port (e.g., 9200) use the -p flag:

# Example connecting to a public server on a custom port with 8 streams
iperf3 -c speedtest.fr -p 9200 -P 8

Always use **parallel streams** when testing against WAN links to get the most accurate result of your available bandwidth.

← Back to Guides Homepage