create_local_in_policy6
Creates a new IPv6 local-in policy to control traffic destined to the FortiGate itself, using interface, IPv6 source/destination addresses, services, and accept/deny action.
Instructions
Create a new IPv6 local-in policy.
IPv6 counterpart of create_local_in_policy -- see that tool's docstring
for the local-in-policy concept. srcaddr/dstaddr reference IPv6
address objects here. There is no ha_mgmt_intf_only field on this
object type (it is IPv4-only on the appliance).
Args: adom: ADOM name package: Policy package name intf: Incoming interface(s) this policy applies to, e.g. ["port1"] srcaddr: Source IPv6 addresses this policy matches dstaddr: Destination IPv6 addresses on the FortiGate itself (e.g. ["all"]) service: Services this policy matches, e.g. ["HTTPS", "SSH"] action: Policy action - "accept" or "deny" (default: "deny", the FortiOS field default) schedule: Schedule object name(s) (default: ["always"] if omitted) status: Policy status - "enable" or "disable" (default: "enable") logtraffic: Local-in traffic logging - "enable" or "disable" (optional) comments: Policy comments (optional) policyid: Specific policy ID (optional, auto-assigned if not set) srcaddr_negate: Match all sources EXCEPT srcaddr (optional) dstaddr_negate: Match all destinations EXCEPT dstaddr (optional) service_negate: Match all services EXCEPT service (optional) virtual_patch: Enable/disable virtual patching on this policy (optional)
Returns: dict: Create result with keys: - status: "success" or "error" - policyid: Created policy ID - message: Status or error message
Example: >>> result = await create_local_in_policy6( ... adom="root", ... package="default", ... intf=["port1"], ... srcaddr=["Admin-Subnet-v6"], ... dstaddr=["all"], ... service=["HTTPS", "SSH"], ... action="accept", ... )
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| adom | Yes | ||
| intf | Yes | ||
| action | No | deny | |
| status | No | enable | |
| dstaddr | Yes | ||
| package | Yes | ||
| service | Yes | ||
| srcaddr | Yes | ||
| comments | No | ||
| policyid | No | ||
| schedule | No | ||
| logtraffic | No | ||
| virtual_patch | No | ||
| dstaddr_negate | No | ||
| service_negate | No | ||
| srcaddr_negate | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||