mkfw_rule
Create a new firewall rule on OPNsense with configurable source, destination, protocol, and action, and optionally apply the changes immediately.
Instructions
Create a new firewall rule and optionally apply changes
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | Description of the rule (required) | |
| interface | No | Interface name (default: 'lan') | |
| action | No | pass, block, or reject (default: 'pass') | |
| protocol | No | any, tcp, udp, icmp, etc. (default: 'any') | |
| source_net | No | Source network/IP (default: 'any') | |
| source_port | No | Source port (default: 'any') | |
| destination_net | No | Destination network/IP (default: 'any') | |
| destination_port | No | Destination port (default: 'any') | |
| direction | No | in or out (default: 'in') | |
| ipprotocol | No | inet or inet6 (default: 'inet') | |
| enabled | No | true or false (default: true) | |
| gateway | No | Gateway to use (default: '') | |
| apply | No | Whether to apply changes immediately (default: true) |