Manage OpenVPN Client
manage_ovpn_clientAdd, update, or remove OpenVPN client interfaces on MikroTik routers. Idempotent by name to prevent duplicate connections.
Instructions
Add, update, or remove an OpenVPN client interface. Idempotent by name (already_exists on matching name+connectTo; CONFLICT on differing connectTo; no_change when an update differs in nothing). Password is always written when provided since RouterOS does not return it on GET.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| routerId | No | Router ID; omit to use the default router. | |
| action | Yes | Action to perform | |
| name | Yes | OpenVPN client interface name — idempotency key | |
| connectTo | No | Remote server address (required for add) | |
| port | No | Remote port number | |
| mode | No | Tunnel mode | |
| protocol | No | Transport protocol | |
| certificate | No | Client certificate name | |
| user | No | VPN username | |
| password | No | VPN password (never logged) | |
| 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. |