sophos_create_firewall_rule
Create an IPv4 firewall security rule to control network access between zones and host objects by defining action, source, destination, and services.
Instructions
Create a new IPv4 firewall security rule.
Use when defining new network access control policies between zones and host objects.
Args: name: Unique name for the firewall rule. action: Rule policy action ('Accept', 'Drop', or 'Reject'). Default is 'Accept'. source_zones: List of source network zone names (e.g. ['LAN']). destination_zones: List of destination network zone names (e.g. ['WAN']). source_networks: List of source host/network object names (e.g. ['Any']). destination_networks: List of destination host/network object names (e.g. ['Any']). services: List of service object names (e.g. ['HTTP', 'HTTPS']). status: Rule status ('Enable' or 'Disable'). Default is 'Enable'. client: Optional SophosFirewallClient instance.
Returns: API response status dictionary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Unique name for the firewall rule. | |
| action | No | Rule policy action: 'Accept', 'Drop', or 'Reject'. | Accept |
| client | No | ||
| status | No | Rule status: 'Enable' or 'Disable'. | Enable |
| services | No | List of service object names (e.g. ['HTTP', 'HTTPS']). | |
| source_zones | No | List of source network zone names (e.g. ['LAN']). | |
| source_networks | No | List of source host/network object names (e.g. ['Any']). | |
| destination_zones | No | List of destination network zone names (e.g. ['WAN']). | |
| destination_networks | No | List of destination host/network object names (e.g. ['Any']). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |