SuperAPIAI Directory

Firewall-AIops

github.com · AI developer platforms

Firewall-AIops is a community open-source AI operations tool for OPNsense and pfSense firewalls, providing governed, auditable read and write operations through a unified MCP server and CLI. It supports reading firmware health, interface gateways, filter rules, NAT, aliases, VPN, DHCP leases, and firewall logs, and provides transparent heuristic analysis such as gateway health, rule hit and shadow analysis, and blocked traffic root cause analysis. Write operations include toggling rules, adding/removing alias entries, refreshing state, restarting services, applying changes, and rebooting devices, where reversible writes record undo descriptors. All calls are logged in an audit log and come with token/call budgets, runaway circuit breakers, risk level labels, and prompt injection sanitization. The project is MIT licensed and is not affiliated with OPNsense, Deciso, Netgate, or the pfSense project.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux · API

About this tool

Firewall-AIops is a community-maintained open-source project aimed at providing governed, auditable AI operations capabilities for OPNsense and pfSense firewalls, targeting AI agents (via MCP) and human users (via CLI). The project is MIT licensed and is not affiliated with, endorsed by, or sponsored by the OPNsense project, Deciso, Netgate, or the pfSense project.

Purpose: The tool supports both OPNsense (REST API, using API key+secret for HTTP Basic authentication) and pfSense (REST API v2, from the pfSense-pkg-RESTAPI package, using X-API-Key header authentication) through a single MCP server, and the same tool names work on both platforms. Each target in the configuration specifies its own platform, and the platform registry selects the API shape (authentication and resource paths) based on the name, so agents do not need to know which firewall they are communicating with.

Main capabilities:

  • Comprehensive reads: firmware/health status, interfaces and gateways, filter rules (including hit counts and state table), NAT (port forwarding/outbound/1:1), aliases, VPN (WireGuard/OpenVPN/IPsec), DHCP leases and reservations, and firewall logs.
  • Flagship root cause analysis: gateway_health_rca (WAN loss/latency/down → causes and actions), rule_hit_and_shadow_analysis (never-hit and shadowed/redundant rules), blocked_traffic_rca (top blocked sources/ports → scans/brute force/probes), all transparent heuristic analyses showing concrete numbers rather than black-box conclusions.
  • Governed writes: toggle rules, add/remove alias entries (reversible, recording undo based on the pre-state fetched), refresh state, restart services, apply changes/reconfigure (high risk, with dry-run preview), and reboot devices (high risk, irreversible, audit only). Every write generates an audit record.
  • Built-in governance framework (zero external dependencies): audit log (recording tool, sanitized parameters, status, duration, risk level, approver, reason), token/call budgets and repeated-call circuit breakers, risk level labels, undo token records, and prompt injection sanitization.

Usage: Can be used as a Claude Code plugin, OpenClRun as an aw plugin, CLI, or standalone MCP server. The MCP server runs over stdio, using uv to fetch and pin to the package version declared by the plugin. Credentials are configured via firewall-aiops init, with secrets stored in ~/.firewall-aiops/secrets.enc (encrypted with Fernet + scrypt-derived key), unlocked by a master password (environment variable FIREWALL_AIOPS_MASTER_PASSWORD or interactive prompt). Non-secret connection details are located in ~/.firewall-aiops/config.yaml. The audit database is located at ~/.firewall-aiops/audit.db, and the undo database is located at ~/.firewall-aiops/undo.db.

Applicable scenarios: Suitable for environments with hybrid OPNsense and pfSense firewall deployments, where AI agents or operations personnel need to perform audited firewall operations, conduct root cause analysis, and optimize rules. Since both platforms are free and self-hostable, a home lab is the most convenient place to run this tool.

Limitations:

  • The tool itself does not decide whether writes are permitted; permissions are determined by the role of the connected account (for example, a read-only API user will cause writes to fail on the server side). There is no read-only switch, policy file, or approval gate that can be configured.
  • Risk levels are descriptive labels only, not gates.
  • Behavior has been verified against simulated OPNsense/pfSense JSON responses; the specific REST paths are modeled on each project's public API and have not yet been actually run against real firewalls. The documentation provides a VERIFICATION.md checklist, and the firewall-aiops doctor command can quickly check connectivity.
  • Restarting the device is irreversible and is only recorded in the audit.
  • When using smaller/local models, refer to agent-guardrails.md for enforced guardrails and ready-made system prompts.

The tool list contains a total of 35 tools, each declaring a risk_level and corresponding to [READ]/[WRITE] documentation tags.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools