firewall_mangle
List IPv4 mangle rules on a MikroTik RouterOS device to inspect packet marking, routing marks, chains, actions, and disabled states without changing configuration.
Instructions
List IPv4 firewall mangle rules (/ip/firewall/mangle): chain
(e.g. prerouting/postrouting/forward/input/output, or a custom
jump-target chain), action (e.g. mark-connection/mark-packet/
mark-routing), comment, disabled, plus whatever other fields
RouterOS returns for a given rule (protocol, src/dst-address, etc -
these vary per rule/action, same as firewall_filter/firewall_nat
not every rule has every field, and this returns each row as-is rather than assuming a fixed shape). Read-only - does not add/ modify/remove rules. See "NAT & mangle rule toggle (by comment)" below for the guarded enable_mangle_rule/disable_mangle_rule pair.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |