add_wireguard_peer
Add a WireGuard peer to a MikroTik interface by specifying its public key and allowed IP addresses. Configure endpoint, keepalive, and preshared key for secure VPN connectivity.
Instructions
Adds a WireGuard peer (with public key and allowed addresses) to an interface on the MikroTik device.
Notes: allowed_address: CIDR, comma-separated for multiple e.g. "10.0.0.2/32" or "10.0.0.0/24,192.168.0.0/24" endpoint_address: remote host IP or hostname e.g. "203.0.113.1" persistent_keepalive: seconds as string e.g. "25"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | No | ||
| comment | No | ||
| disabled | No | ||
| interface | Yes | ||
| public_key | Yes | ||
| endpoint_port | No | ||
| preshared_key | No | ||
| allowed_address | Yes | ||
| endpoint_address | No | ||
| persistent_keepalive | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |