add_wireguard_interface
Create a WireGuard tunnel interface on a MikroTik RouterOS device. Preview with confirm=False before applying; RouterOS generates the private key internally.
Instructions
Create a WireGuard tunnel interface (/interface/wireguard add).
RouterOS generates the interface's private-key internally - this
tool never accepts (or returns) one. The confirm=False preview's
after only describes what will be created (name, listen-port
if given) - it does not invent a public-key, since RouterOS hasn't
generated the key pair yet at preview time. The confirm=True
applied result re-reads the created interface and reports its real
public-key, with private-key always stripped. See README's
"WireGuard management" section.
WRITE tool, guarded: blocked entirely unless the server is running
with MIKROTIK_ALLOW_WRITE=true. Call with confirm=False (the
default) to preview without changing anything; call again with
confirm=True to actually create it. Errors clearly if name already
exists - never creates a duplicate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| confirm | No | ||
| device_name | Yes | ||
| listen_port | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||