toggle_rule
Enable or disable a firewall filter rule with reversible undo support, staging changes until applied, and optional dry-run preview before committing.
Instructions
[WRITE][risk=medium] Enable/disable a filter rule; reversible.
Reads the rule first so the harness records an undo that restores its prior enabled state. Staged only — run apply_changes to make it live. Pass dry_run=True to preview.
Args: uuid: Rule uuid (OPNsense) or id (pfSense), from list_rules. enable: True to enable the rule, False to disable. dry_run: If True, preview without changing. target: Firewall target name from config; omit for the default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes | ||
| enable | Yes | ||
| target | No | ||
| dry_run | No |