create_firewall_rule_advanced
Create firewall rules on a live pfSense appliance with configurable interface, protocol, addresses, ports, schedule, and gateway. Apply changes immediately or stage them for review.
Instructions
Create a firewall rule on the live pfSense appliance.
WARNING: This modifies the running firewall configuration.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | Source address (any, IP, network, alias name) | |
| gateway | No | Optional gateway for policy routing (e.g., "WAN_DHCP") | |
| disabled | No | Create the rule in disabled state (useful for staging) | |
| position | No | Position to insert rule (0 = top). Rule is created first, then moved. | |
| protocol | Yes | Protocol (tcp, udp, icmp, any) | |
| schedule | No | Name of an existing firewall schedule (from search_firewall_schedules) — the rule is only active during the schedule's time ranges | |
| interface | Yes | Interface for the rule (wan, lan, etc.) | |
| rule_type | Yes | Rule type (pass, block, reject) | |
| ipprotocol | No | IP protocol family — "inet" (IPv4, default), "inet6" (IPv6), or "inet46" (both) | inet |
| description | No | Optional rule description | |
| destination | Yes | Destination address (any, IP, network, alias name) | |
| log_matches | No | Whether to log packets matching this rule | |
| source_port | No | Source port — single (443), range (1024-65535), or alias name | |
| destination_port | No | Destination port — single (443), range (1024-65535), or alias name | |
| apply_immediately | No | Whether to apply changes to the running firewall |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||