
STEP BY STEP
.
Login into pfSense and Go to Diagnostics > Command Prompt.
Install SpeedTest-CLI command-line interface for testing internet bandwidth using speedtest.net.
We’ll do this by pasting the following command into the ‘Execute Shell Command’ box and press the ‘Execute’ button.
1 | pkg update ; pkg install -y py27-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 SpeedTest.net 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:
12345 | pkg update pkg install -y py27-speedtest-cli speedtest |
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
1 | 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:
1 | speedtest –csv-header; speedtest –csv |
