update_wireguard_peer
Modify an existing WireGuard peer on MikroTik RouterOS by updating allowed addresses, endpoint, keepalive, or enabled state. Pass empty strings to clear endpoint or preshared key.
Instructions
Updates an existing WireGuard peer's allowed addresses, endpoint, keepalive, or enabled state.
Notes: peer_id: "*N" or "N" from list output e.g. "*2" allowed_address: CIDR, comma-separated e.g. "10.0.0.2/32" or "10.0.0.0/24,192.168.0.0/24" persistent_keepalive: seconds as string e.g. "25" Pass "" for endpoint_address or preshared_key to clear them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | No | ||
| comment | No | ||
| peer_id | Yes | ||
| disabled | No | ||
| endpoint_port | No | ||
| preshared_key | No | ||
| allowed_address | No | ||
| endpoint_address | No | ||
| persistent_keepalive | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |