Executing command line commands using the web interface

From PFSenseDocs
Jump to: navigation, search
This article is part of the How-To series.

Summary

This article explains how shell command commands may be run directly from the pfSense WebGUI. Note that this functionality is not officially supported, use at your own risk!

Description

  • Navigate to Diagnostics > Command in the WebGUI
  • Enter the command to run in the Command field inside the Execute Shell Command section
Commands entered here will be executed as if they were run from a command line, and the results returned on the page. Commands must run non-interactively and must exit on their own. See Warnings below.
Sample command
  • Click Execute
  • The output from the command will be displayed, such as:
Sample output from 'w' command


Warnings

Commands run from this function must run and then stop/return.

Commands that run indefinitely, such as ping without a count or tcpdump without a limit set will never stop or return output, and will be left running indefinitely in the backgound until they are manually killed.

Interactive commands, such as vi will fail similarly, or may exit due to other issues with the terminal being non-interactive.