Add a firewall rule
mikrotik_firewall_add_ruleAdds a MikroTik firewall rule to a selected chain and table, accepting rule properties and optional placement above an existing rule.
Instructions
Add a firewall rule. properties takes any rule property (src-address, dst-port, protocol, in-interface, connection-state, to-addresses, ...). Use placeBefore with a rule .id to insert it above an existing rule; otherwise it is appended to the end of the table.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ipv6 | No | ||
| chain | Yes | ||
| table | No | filter | |
| action | Yes | e.g. "accept", "drop", "reject", "masquerade", "dst-nat", "add-src-to-address-list" | |
| device | No | Name of the configured device. Defaults to the first device (see mikrotik_list_devices). | |
| comment | No | ||
| properties | No | ||
| placeBefore | No |