lookup_policy
Determine which FortiGate firewall policy a hypothetical flow would match, without sending traffic. Identify the matching rule or implicit deny for any source, destination, port and protocol.
Instructions
Ask the FortiGate which firewall policy a hypothetical flow would match (monitor/firewall/policy-lookup), without sending any traffic.
Use it to answer "would host X reach server Y on port Z, and through which rule?".
Parameters:
device_id: Identifier of the FortiGate device
source_ip: Source IPv4 address
destination_ip: Destination IPv4 address
destination_port: Destination port
protocol: tcp (default), udp, icmp, sctp or a protocol number
source_interface: Optional ingress interface name (improves accuracy)
source_port: Optional source port
vdom: Virtual Domain name (optional)
Returns:
Matching policy id/name/action, or "no matching policy" (implicit deny)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vdom | No | Virtual Domain | |
| protocol | No | tcp, udp, icmp, sctp or protocol number | tcp |
| device_id | Yes | FortiGate device identifier | |
| source_ip | Yes | Source IPv4 address | |
| source_port | No | Source port | |
| destination_ip | Yes | Destination IPv4 address | |
| destination_port | Yes | Destination port | |
| source_interface | No | Ingress interface name |