execute_ipsec_tunnel_action
Bring an IPsec tunnel up or down on a FortiGate device to control site-to-site VPN connectivity; optionally target a specific phase-2 selector.
Instructions
Bring an IPsec tunnel up or down (monitor/vpn/ipsec/tunnel_up | tunnel_down).
Bringing a site-to-site tunnel down interrupts traffic until it renegotiates; requires writes to be enabled.
Parameters:
device_id: Identifier of the FortiGate device
phase1_name: Phase-1 interface name (see list_ipsec_phase1 / list_ipsec_tunnels)
action: "up" or "down"
phase2_name: Optional phase-2 selector name (defaults to all selectors of the phase-1)
vdom: Virtual Domain name (optional)
Returns:
Action status
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": {
"device_id": "<device_id>",
"phase1_name": "<phase1_name>",
"action": "<action>"
},
"name": "execute_ipsec_tunnel_action"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vdom | No | Virtual Domain | |
| action | Yes | Bring the tunnel up or down | |
| device_id | Yes | FortiGate device identifier | |
| phase1_name | Yes | Phase-1 interface name | |
| phase2_name | No | Phase-2 selector name |