Create Firewall Policy
unifi_create_firewall_policyCreates a zone-based UniFi firewall policy to enforce ALLOW, BLOCK, or REJECT rules between source and destination zones. Confirm live-traffic changes with the user first.
Instructions
Create a zone-based firewall policy. 'config' is the full policy object; required: name, enabled, action (ALLOW/BLOCK/REJECT), source, destination, ipProtocolScope, loggingEnabled. Model it on an existing policy fetched via unifi_get_firewall_policy. CAUTION: a new ALLOW/BLOCK policy changes live traffic filtering — confirm with the user.
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": {
"config": "<config>"
},
"name": "unifi_create_firewall_policy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config | Yes | Full firewall policy object. Required: name, enabled, action, source, destination, ipProtocolScope, loggingEnabled. See unifi_get_firewall_policy for the shape. A config with any value still containing "[redacted]" (how reads show credentials) is refused: put the real value in, or leave the field out. | |
| siteId | No | Site ID (UUID from unifi_list_sites). Optional — when the console has exactly one site it is used automatically. |