list_firewall_policies
list_firewall_policies
Section titled “list_firewall_policies”List every Zone-Based Firewall policy on the controller (v2 API).
Side effects: None (read-only).
Sites on UniFi Network 9.x and newer that use the Zone-Based Firewall
keep their policy here, not in the legacy rulesets that
list_firewall_rules reads. A site still on legacy rulesets returns
[] from this tool and its rules from list_firewall_rules;
audit_open_ports reads both so you do not have to guess which
model a site uses.
Returns one record per policy with _id, name, action
(ALLOW/BLOCK/REJECT), enabled, predefined
(controller-managed, not user-created), index, protocol,
ip_version, and source / destination objects whose
zone_id refers to a record from list_firewall_zones. Read
only: this server does not create or edit zone policies yet.
Example
Section titled “Example”list_firewall_policies(controller="default")Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
controller |
string |
no | “default” | Name of the UniFi controller to target. Defaults to "default". |