← Back to Guides Homepage

How to Install and Use iPerf3 on pfSense, Ubuntu, and Windows

In this guide, you will learn how to install and use iPerf3, a powerful CLI tool for measuring network bandwidth between different hosts. This tool is essential for ruling out network bandwidth issues. We will cover installation on pfSense, Ubuntu Linux, and Windows Server, and demonstrate how to run performance tests between them.

Part 1: Installing iPerf3 Server on pfSense

We will begin by setting up the server side of the test on a pfSense firewall. pfSense utilizes a package manager which makes installation very straightforward.

1. Install the Package

Navigate to System and select Package Manager. Go to the "Available Packages" tab and search for "iperf". Locate iperf3 and click the green install button to confirm the installation.

2. Start the iPerf Service

Once installed, the service is not found under the standard Services menu. Instead, go to Diagnostics and select iPerf.

To run the server:

The server will now run in the background, allowing you to navigate away from the page while testing continues.

Part 2: Setting up the Client on Ubuntu

Next, we will configure an Ubuntu machine to act as the client and test connectivity to the pfSense server.

1. Update and Install

Open your terminal. It is best practice to update your repositories before installation.

sudo su
apt update
apt upgrade

Once the system is updated, install iPerf3:

apt install iperf3

2. Running a Basic Bandwidth Test

To connect to the pfSense server, use the following command syntax (replacing the IP address with your server's IP):

iperf3 -c 192.168.1.99

This initiates a default TCP bandwidth test with one stream for 10 seconds. You will see a summary of the transfer and bandwidth (e.g., 650 Mbits/sec) upon completion. If testing VM-to-VM, your CPU might throttle the speed.

3. Advanced Testing: Parallel Streams

To simulate a more realistic scenario, such as video streaming or heavy internet usage, you should use multiple parallel TCP streams. This is done using the -P flag followed by the number of streams.

iperf3 -c 192.168.1.99 -P 10

This often results in higher throughput (e.g., 1.5 Gbits/sec) as it utilizes more available bandwidth.

4. Adjusting Test Duration

You can also specify the duration of the test using the -t flag. For example, to run a test for 15 seconds:

iperf3 -c 192.168.1.99 -t 15

Part 3: Installing iPerf3 on Windows Server

The procedure for Windows Server (tested here on Server 2025) is similar to other modern Windows systems.

1. Download the Binary

Search for "iPerf3" and locate the official GitHub release page (avoiding third-party sites when possible). Download the standard client version, typically named iperf-version-win64.zip.

Extract the contents of the zip file. You will see an executable file (iperf3.exe) and a DLL file.

2. Run via Command Line

Right-click inside the folder and choose "Open in Terminal" or open a Command Prompt and navigate to the folder.

To run it as a client connecting to the pfSense server:

iperf3 -c 192.168.1.99

3. Running Windows as a Server

To enable the Windows machine to receive traffic (act as a server), use the -s flag:

iperf3 -s

The server will listen on port 5201 by default.

Part 4: Configuring Windows Firewall

When running iPerf3 as a server on Windows, the default firewall settings will likely block incoming connections. You must create an inbound rule.

1. Create a New Inbound Rule

Open Windows Defender Firewall with Advanced Security.

  1. Click Inbound Rules and then New Rule.
  2. Select Port and click Next.
  3. Select TCP and specify Specific local ports: 5201.
  4. Select Allow the connection.
  5. Check Domain, Private, and Public (depending on your needs) and click Next.
  6. Name the rule (e.g., "iPerf3 Port 5201") and click Finish.

Once the rule is active, you can return to your Ubuntu client and test the connection to the Windows machine:

iperf3 -c 192.168.1.104

Part 5: Testing Against Public Mirrors

You can also test your internet bandwidth by connecting to public iPerf3 servers. A list is available on the official iPerf homepage.

1. Connect to a Public Host

Public servers often listen on specific ports. Use the -p flag (lowercase) to specify the port.

iperf3 -c speedtest.fr -p 9200

2. Maximize Throughput with Parallel Streams

Single-stream connections over the internet often yield lower results due to latency and window scaling. Use parallel streams to saturate the line:

iperf3 -c speedtest.fr -p 9200 -P 10

This will typically provide a much more accurate representation of your available bandwidth capacity.

← Back to Guides Homepage