Manage IPSec Peer
manage_ipsec_peerAdd, remove, enable, or disable an IPSec peer on a MikroTik router with idempotent name-based operations.
Instructions
Add, remove, enable, or disable an IPSec peer. Idempotent by name: add returns already_exists if a peer with the same name and address already exists.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| routerId | Yes | Target router identifier from the router registry | |
| action | Yes | Action to perform | |
| name | Yes | Peer name — idempotency key | |
| address | No | Remote gateway address (required for add) | |
| localAddress | No | Local address | |
| exchange | No | IKE exchange mode | ike2 |
| profile | No | IKE profile name | |
| comment | No | Optional comment | |
| dryRun | No | Preview changes without applying | |
| confirmationToken | No | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |