Skip to main content

Overview

Give scripts and home-automation tools a small set of pfSense actions without sharing your firewall login or a remote shell.

What Is pfSense Actions?

pfSense Actions is a small self-hosted controller that sits between your automation and one pfSense firewall. It signs in to the firewall over SSH, runs one fixed operation per request, and reports the result.

Why Use pfSense Actions?

  1. Keeps the pfSense login in one place, so each script holds only its own personal access token.
  2. Limits each token to named scopes, so a Wake-on-LAN shortcut can't run other actions.
  3. Answers with a data-minimizing response, so scripts learn the outcome without seeing firewall output.
  4. Includes an operations console, so you can create and revoke tokens without editing files.
  5. Sends alerts to ntfy, Telegram, email, and other services when pfSense stops answering or sign-in is locked, so you hear about a problem before a script runs into it.

Supported Actions

RequestWhat it doesScope
GET /api/v1/connectivityChecks that pfSense Actions can sign in to the firewall.pfsense:read
GET /api/v1/systemReturns the firewall's operating system, release, and architecture.pfsense:read
POST /api/v1/pingAsks the firewall to ping one IP address.reachability:read
POST /api/v1/wolSends a Wake-on-LAN packet from the firewall.wol:execute

The same actions also answer at GET /, GET /system, POST /ping, and POST /wol, so scripts written for 1.x keep working.

What It Doesn't Do

  • It doesn't run arbitrary commands or open a remote shell for callers.
  • It doesn't change, import, or export pfSense configuration.
  • It doesn't replace the pfSense web interface, and the operations console can't change firewall settings.
  • It manages one target firewall per deployment.

How It Works

  1. Your script sends a request with its personal access token.
  2. pfSense Actions checks the token and its scope before contacting the firewall.
  3. It signs in to the firewall over SSH, runs the commands for that action, and signs out.
  4. Your script receives a status code and a small JSON result, or three system fields for GET /api/v1/system.

Requirements at a Glance

  • pfSense firewall — SSH turned on and an account that pfSense Actions can sign in with.
  • A host to run it — Docker with Compose on an amd64 or arm64 machine, or Node.js 24 to run from source.
  • HTTPS — A reverse proxy or another encrypted path for any traffic that leaves the host.

Next Steps