create_firewall_rule_advanced
Add a fully customized firewall rule to the live pfSense appliance, setting interface, action, protocol, source, destination, ports, schedule, and placement. Supports policy routing, IPv4/IPv6, and immediate apply.
Instructions
Create a firewall rule on the live pfSense appliance.
WARNING: This modifies the running firewall configuration.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"interface": "<interface>",
"rule_type": "<rule_type>",
"protocol": "<protocol>",
"source": "<source>",
"destination": "<destination>"
},
"name": "create_firewall_rule_advanced"
}
}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 | |||