opnsense_fw_add_rule
Add a firewall filter rule to control network traffic by specifying action, direction, interface, protocol, and network addresses.
Instructions
Add a new firewall filter rule. Run opnsense_fw_apply afterwards to activate.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Rule action | |
| direction | Yes | Traffic direction | |
| interface | No | Interface name (e.g. 'lan', 'wan') | |
| protocol | No | Protocol | |
| source_net | No | Source network (CIDR, alias, or 'any') | |
| destination_net | No | Destination network (CIDR, alias, or 'any') | |
| destination_port | No | Destination port or range (e.g. '443', '80-443') | |
| description | No | Rule description |