OPNsense Firewall Admin (opnmcp MCP)

    1

    Audit, troubleshoot, and safely modify OPNsense firewall rules with automatic lockout protection and rollbacks.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    OPNsense Firewall Admin (opnmcp MCP)

    Example session with this skill installed

    Check why 192.168.1.50 cannot reach the internet on port 443 and suggest a fix.

    • Read your context and instructions
    • Compiled the opnsense firewall admin

    I have analyzed the traffic path for host 192.168.1.50. The simulation shows that traffic is being dropped by the default deny rule on the LAN interface because no specific allow rule matches this outbound request.

    Traffic Diagnostic Report

    StepToolResult
    Interface Mapopn_list_interfaces192.168.1.50 is on igb1 (LAN)
    Simulationopn_simulate_firewall_trafficDropped by Default deny rule (Rule ID: 0)
    Log Checkopn_firewall_logMultiple blocked SYN packets from 192.168.1.50:54322 to 1.1.1.1:443
    State Checkopn_pf_states0 active states for this source/destination pair
    Gatewayopn_gateway_statusWAN_GW is Online

    Recommended Fix

    No LAN rule allows outbound HTTPS for this host, so it falls through to the default deny. The smallest fix is one pass rule for this IP on port 443. Nothing has been changed yet.

    
    # Proposed Action:
    # 1. opn_add_firewall_rule on LAN interface
    # 2. Source: 192.168.1.50, Destination: any, Port: 443, Action: Pass
    # 3. opn_apply_firewall_changes (Rollback active: 120s)
    

    Next steps

    1. Would you like me to stage the new firewall rule for 192.168.1.50?
    2. Shall I simulate the traffic again with the staged rule before we apply it?
    3. I can check if there is an existing Alias I should use instead of the raw IP.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Managing an OPNsense firewall manually often leads to configuration errors or accidental lockouts. This skill enables an AI agent to audit, troubleshoot, and modify firewall settings through a staged, safe workflow.

    What it does

    • Security Auditing scans configurations and rule sets to identify exposures and high-severity vulnerabilities.
    • Traffic Simulation tests if specific traffic flows will be allowed or blocked by current rules without sending packets.
    • Diagnostics inspects live packet states, gateway status, routing tables, and filtered firewall logs to resolve connectivity issues.
    • Safe Rule Management handles adding, moving, or deleting firewall and NAT rules using a staged application process.
    • Lockout Protection checks offline that the agent will still reach the firewall before applying, and rolls back any change that is not confirmed in time.

    How it works

    1. Verify Environment checks the opnmcp server status and confirms if write permissions and rollback timers are active.
    2. Fact Gathering maps interfaces and analyzes live states or logs to diagnose reported network issues.
    3. Staged Changes prepares rule modifications in a pending state and simulates the outcome before any live application.
    4. Controlled Apply pushes changes to the firewall with an active watchdog timer that reverts the config unless manually confirmed.

    Frameworks & tools

    This skill requires the free, open-source opnmcp MCP server (MIT), Node.js 20.10+, and an OPNsense API key with core/backup privileges. It interfaces with the OPNsense API to manage pf rules, NAT, Unbound DNS, DHCP, and VPN services.

    Why this beats prompting it yourself

    Standard prompts lack the stateful logic required to handle OPNsense staging and rollbacks. This skill enforces a strict diagnostic order, from interface mapping to state inspection, ensuring changes are backed by evidence rather than guesses.

    Use cases

    • Debug why a specific internal host cannot reach an external service or VPN.
    • Perform a security review of all open WAN ports and NAT reflections.
    • Add new firewall rules with a safety net that prevents losing access to the UI.
    • Investigate suspicious host behavior by correlating logs with active pf states.

    Known limitations

    opnmcp is tested against a fake server modeled on OPNsense's PHP code, not a real firewall yet: start with a read-only API key and keep console access for your first writes. Does not support reboots, firmware updates, or log wiping unless explicitly unblocked in the server environment. DNS and DHCP changes do not support the automatic rollback timer.

    Rollback timer is not supported for DNS, DHCP, or routing changes. Requires Node.js 20.10+ and specific OPNsense API privileges for backups. Redacted secrets cannot be restored via the agent.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 10 days ago

    • Free with an Agensi account

    Requires

    Opnmcp (OPNsense Server) MCP
    OPNsense firewall + API key
    Node.js 20.10+
    Git
    Node.js

    Permissions

    Terminal / Shell
    Network Access
    Environment Variables
    Listed10 days ago

    What's inside

    Frequently Asked Questions

    Every firewall/NAT change is staged first, simulated, then checked offline to make sure the agent will still reach the firewall before it is applied. After applying, the change stays temporary: if it is not confirmed before the timer ends (120 s by default), it is rolled back. Keep console access for risky changes anyway, since on OPNsense 26.7+ the timer runs on the machine hosting the MCP server.

    The skill requires the `opnmcp` server, Node.js 20.10+, and an OPNsense API key with core and backup privileges to function correctly.

    Yes, the skill is designed to work with any AI agent platform that supports standard tool-calling and has network access to your `opnmcp` server instance.

    Yes. The skill is free, and the opnmcp MCP server it drives is open source under the MIT license: https://github.com/yutho-o/opnmcp

    While firewall and NAT rules are protected by the rollback timer, changes to Unbound DNS and DHCP services are currently applied immediately and do not support the automatic revert feature.

    New in APIs & Backend