Manage IPSec Peer
manage_ipsec_peerManage IPSec peers on MikroTik routers: add, remove, enable, or disable. Idempotent by name and address to prevent duplicates.
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 | No | Router ID; omit to use the default router. | |
| 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. |