create_device_ipsec_phase1_interface
Create an IPsec phase1-interface remote gateway in a managed device's database to configure a route-based VPN tunnel, specifying the local interface, gateway type, PSK, and IKE settings.
Instructions
Create an IPsec phase1-interface (remote gateway / IKE SA) in a device's device DB.
Route-based (interface-mode) tunnel only -- this always writes an
interface (the outgoing local interface), matching the
phase1-interface table this tool targets rather than the legacy
policy-based phase1 table.
Args: device: Managed device name name: New phase1-interface (remote gateway) name interface: Local physical/aggregate/loopback/VLAN outgoing interface type: Remote gateway type: "static", "dynamic" or "ddns"; default "static" remote_gw: Remote gateway's external IPv4 address. Required when type is "static" -- a static gateway with no address cannot connect psksecret: Pre-shared key for PSK authentication, 6-128 characters ike_version: IKE protocol version, "1" or "2" mode: IKEv1 ID protection mode: "main" or "aggressive" (ignored on IKEv2) peertype: Peer ID acceptance: "any", "one", "dialup", "peer" or "peergrp". Defaults to "any" when type is "static" and no value is given -- live-verified against FMG 7.6.7: a static PSK gateway created without peertype is rejected with "peer invalid value", so this tool supplies the working default rather than surfacing that error to the caller proposal: Phase1 encryption/authentication proposal list (e.g. ["aes256-sha256"]). Values are passed through to FortiManager largely unvalidated -- see module docstring dhgrp: Phase1 Diffie-Hellman group list (e.g. ["14", "21"]). Same pass-through as proposal nattraversal: NAT traversal: "disable", "enable" or "forced" dpd: Dead Peer Detection mode: "disable", "on-idle" or "on-demand" keylife: Phase1 key life in seconds comments: Free-text comment vdom: VDOM the gateway lives in (default "root")
Returns: Creation result with any echoed credential stripped
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dpd | No | ||
| mode | No | ||
| name | Yes | ||
| type | No | static | |
| vdom | No | root | |
| dhgrp | No | ||
| device | Yes | ||
| keylife | No | ||
| comments | No | ||
| peertype | No | ||
| proposal | No | ||
| interface | Yes | ||
| psksecret | No | ||
| remote_gw | No | ||
| ike_version | No | ||
| nattraversal | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||