- Home
- Skills
- APIs & Backend
- OPNsense Firewall Admin (opnmcp MCP)
OPNsense Firewall Admin (opnmcp MCP)
Audit, troubleshoot, and safely modify OPNsense firewall rules with automatic lockout protection and rollbacks.
Free
Works with the AI Agents you already use
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
| Step | Tool | Result |
|---|---|---|
| Interface Map | opn_list_interfaces | 192.168.1.50 is on igb1 (LAN) |
| Simulation | opn_simulate_firewall_traffic | Dropped by Default deny rule (Rule ID: 0) |
| Log Check | opn_firewall_log | Multiple blocked SYN packets from 192.168.1.50:54322 to 1.1.1.1:443 |
| State Check | opn_pf_states | 0 active states for this source/destination pair |
| Gateway | opn_gateway_status | WAN_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
- Would you like me to stage the new firewall rule for
192.168.1.50? - Shall I simulate the traffic again with the staged rule before we apply it?
- 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
- Verify Environment checks the
opnmcpserver status and confirms if write permissions and rollback timers are active. - Fact Gathering maps interfaces and analyzes live states or logs to diagnose reported network issues.
- Staged Changes prepares rule modifications in a pending state and simulates the outcome before any live application.
- 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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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