enable_mangle_rule
Enable an existing MikroTik firewall mangle rule by its comment, optionally narrowing by chain. Preview the matched rule first, then confirm to apply; never creates or guesses a rule.
Instructions
Enable an EXISTING firewall mangle rule (/ip/firewall/mangle set disabled=no), resolved by its comment - optionally narrowed by
chain (e.g. prerouting/postrouting/forward/input/output)
if more than one rule shares that comment.
Same "never creates a rule" guarantee and comment-based resolution
as enable_firewall_rule - extended to /ip/firewall/mangle.
WRITE tool, guarded: blocked entirely unless the server is running
with MIKROTIK_ALLOW_WRITE=true. Call with confirm=False (the
default) to get a before/after preview - the FULL matched rule, not
just its disabled field - without changing anything; call again
with confirm=True to actually apply it. Errors clearly if no rule
matches comment (narrowed by chain), or if more than one still
does (AmbiguousResourceError) - never guesses which one to toggle.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | ||
| comment | Yes | ||
| confirm | No | ||
| device_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||