How to run directly from the pfSense GUI

In this post, I show how to measure the bandwidth using directly from the pfSense GUI.
Updated Sept 27, 2021 to reflect py37-speedtest-cli package change.


Login into pfSense and Go to Diagnostics > Command Prompt.

Install SpeedTest-CLI command-line interface for testing internet bandwidth using

We’ll do this by pasting the following command into the ‘Execute Shell Command’ box and press the ‘Execute’ button.

pkg update ; pkg install -y py37-speedtest-cli

Speedtest-CLI package will be installed into /usr/local/bin directory, which (by default) is already on PATH in FreeBSD.

So once the above is done, we can simply clear the ‘Execute Shell Command’ box, type in the ‘speedtest‘ command and press the ‘Execute’ button.

The result of the test executed directly on your pfSense router’s WAN connection will be displayed on the screen:

And that’s pretty much it.

Note: If you do not want to do this through GUI, run the same commands directly in the command-line interface of pfSense, by using the command line option #8:

It’s just 3 commands:

pkg update
pkg install -y py37-speedtest-cli

I hope this helped.


If you’re planning to configure it as a cron job and output the results into CSV, you can run it as a parsed result file

speedtest | awk -v FS="(: | ms| Mbit/s)" '{print $2}' | tr '\n' ',' | sed 's/^.....//' | sed 's/.\{2\}$//' | sed 's/,\{2,\}/,/g'

The results will show as a comma-separated output with three values (PING in milliseconds, DOWNLOAD in Mbps and UPLOAD in Mbps):

This could set someone with a little more time on the right path. Just append ‘>> speedtest.txt’ to the end of the above command and it’ll save the result to a text file.
Or another way is to simply use the native CSV output and run:
speedtest --csv-header; speedtest --csv

Facebook Comments