vyos_configure_wireguard
Configures a VyOS WireGuard interface and its peers in one commit, with optional post-commit save, to set up or update VPN connectivity.
Instructions
Configure a WireGuard interface and its peers in one commit.
Generate a key-pair first with vyos_generate(path="pki wireguard key-pair").
Args: interface: WireGuard interface name, e.g. "wg0". address: Interface address, e.g. "10.0.0.1/24". private_key: The interface private key. listen_port: UDP listen port. peers: Map of peer name -> settings, e.g. {"to-site-b": {"public-key": "...", "allowed-ips": "10.0.0.2/32", "address": "203.0.113.5", "port": "51820", "persistent-keepalive": "15"}}. "allowed-ips" accepts a single value; pass a list via extra batch calls for multiple. Nested keys may be space-separated. save: Persist after commit (default False).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"interface": "<interface>"
},
"name": "vyos_configure_wireguard"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| save | No | ||
| peers | No | ||
| address | No | ||
| interface | Yes | ||
| listen_port | No | ||
| private_key | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |