unifi_set_firewall_policy_enabled
Enable or disable a user-defined UniFi firewall policy, with preview and explicit confirmation when the change could affect protected networks; system policies and IPS auto-blocks are refused.
Instructions
Enable or disable a user-defined firewall policy. Easy unless the policy can reach a protected network; then it needs confirm: true and previews first. System-defined policies and the IPS auto-blocks are refused. A side that is a zone alone reaches every network in it, and UniFi's Internal zone holds every LAN. So a policy on a zone holding a protected network (UNIFI_MCP_PROTECTED_NETWORKS, pi-cluster by default) is confirm-level unless its filters provably exclude it: a NETWORK filter naming only other networks the console has, or IPv4 addresses, ranges or subnets (directly or through an IPv4 traffic matching list) outside the protected subnets. Addresses that overlap a protected subnet are confirm-level in any zone. Anything the guard cannot place leans to confirm: an unknown zone, list or network id, an IPv6 address, an opposite match, or a MAC, port or other filter, which counts as the whole zone.
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": {
"policy": "<policy>",
"enabled": "<enabled>"
},
"name": "unifi_set_firewall_policy_enabled"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | No | Site name, id or reference; optional while the console has a single site | |
| policy | Yes | Policy id or exact name | |
| confirm | No | Must be true to carry out a guarded change; without it the tool only previews it | |
| enabled | Yes | true enables, false disables |