Skip to main content
Version: current

peers


interface/wireguard/peers

Type: Directory

FlagNameDescription
XdisabledWhether an item is disabled.
DdynamicWhether the peer was created dynamically.
ArgumentTypeDescription
interface ( mandatory )iface_enumName of the WireGuard interface the peer belongs to.
namestringAdds a name to a peer, used as a reference in WireGuard logs. Available from RouterOS version 7.15.
public-keystringA base64 public key calculated from the private key. Public keys are used by peers to authenticate each other.
private-keyalt { private-key: enum (none | auto) { none:0, auto:1 } , private-key: string }A base64 private key. auto generates the key automatically, none disables it.
endpoint-addressaddress (flags=46D)The IP address or hostname used by WireGuard to establish a secure connection between two peers.
endpoint-portnumThe UDP port on which a WireGuard peer listens for incoming traffic.
allowed-address ( mandatory )multi { allowed-address: address (flags=46/) }List of IP (v4 or v6) addresses with CIDR masks from which incoming traffic for this peer is allowed and to which outgoing traffic for this peer is directed. Allowed-address ranges cannot overlap on one interface.
preshared-keyalt { preshared-key: enum (none | auto) { none:0, auto:1 } , preshared-key: string }A base64 preshared key. Adds an additional layer of symmetric-key cryptography for post-quantum resistance. auto generates the key automatically.
persistent-keepalivetimeInterval in seconds of how often to send an authenticated empty packet to the peer to keep a stateful firewall or NAT mapping valid. A value of 0 disables the keepalive.
client-addressmulti { client-address: address (flags=46/) }When imported with a QR code by a client, this address for the WireGuard interface is set on that device.
client-dnsmulti { client-dns: address (flags=46D) }DNS servers used when the WireGuard server acts as a VPN gateway for peer traffic.
client-endpointaddress (flags=46D)The IP address and port number of the WireGuard server.
client-keepalivetimeSame as persistent-keepalive but from the peer side.
client-listen-portnumThe local port on which the WireGuard tunnel listens for incoming traffic from peers and from which it sources outgoing packets.
client-allowed-addressmulti { client-allowed-address: address (flags=46/) }Allowed IPs configured for the client. Available from RouterOS version 7.21.
client-mtunumMTU value set on the client when importing configuration.
responderboolSpecifies if the peer is a connection initiator or only a responder. Use on WireGuard devices that act as servers for client devices. Otherwise the router repeatedly tries to connect to endpoint-address or current-endpoint-address.
Read-only ArgumentTypeDescription
current-endpoint-addressaddress (flags=46)The most recent source IP address of correctly authenticated packets from the peer.
current-endpoint-portnumThe most recent source IP port of correctly authenticated packets from the peer.
rxnumThe total amount of bytes received from the peer.
txnumThe total amount of bytes transmitted to the peer.
last-handshaketimeTime in seconds after the last successful handshake.