Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

WireGuard® is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPsec, while avoiding the massive headache. It intends to be considerably more performant than OpenVPN. WireGuard is designed as a general purpose VPN for running on embedded interfaces and super computers alike, fit for many different circumstances. Initially released for the Linux kernel, it is now cross-platform (Windows, macOS, BSD, iOS, Android) and widely deployable.

Properties

PropertyDescription
comment (string; Default: )Short description of the tunnel.
disabled (yes | no; Default: no)Enables/disables the tunnel.
listen-port (integer; Default: 13231)Port for WireGuard service to listen on for incoming sessions.
mtu (integer [0..65536]; Default: 1420)Layer3 Maximum transmission unit.
name (string; Default: )Name of the tunnel.
private-key (string; Default: )A base64 private key. If not specified, it will be automatically generated upon interface creation.

Read-only properties

PropertyDescription
public-key (string)A base64 public key calculated from the private key.
running (yes | no)

Whether interface is running.

Peers

PropertyDescription
allowed-address (IP/IPv6 prefix; Default: )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. The catch-all 0.0.0.0/0 may be specified for matching all IPv4 addresses, and ::/0 may be specified for matching all IPv6 addresses.
comment (string; Default: )Short description of the peer.
disabled (yes | no; Default: no)Enables/disables the peer.
endpoint-address (IP/Hostname; Default: )An endpoint IP or hostname, can be left blank to allow remote connection from any address.
endpoint-port (integer:0..65535; Default: )An endpoint port, can be left blank to allow remote connection from any port.
interface (string; Default: )Name of the WireGuard interface the peer belongs to.
persistent-keepalive (integer:0..65535; Default: 0)A seconds interval, between 1 and 65535 inclusive, of how often to send an authenticated empty packet to the peer for the purpose of keeping a stateful firewall or NAT mapping valid persistently. For example, if the interface very rarely sends traffic, but it might at anytime receive traffic from a peer, and it is behind NAT, the interface might benefit from having a persistent keepalive interval of 25 seconds.
preshared-key (string; Default: )A base64 preshared key. Optional, and may be omitted. This option adds an additional layer of symmetric-key cryptography to be mixed into the already existing public-key cryptography, for post-quantum resistance.
public-key (string; Default: )The remote peer's calculated public key.

Read-only properties

PropertyDescription
current-endpoint-address (IP/IPv6)The most recent source IP address of correctly authenticated packets from the peer.
current-endpoint-port (integer)The most recent source IP port of correctly authenticated packets from the peer.
last-handshake (integer)Time in seconds after the last successful handshake.
rx (integer)Total amount of bytes received from the peer.
tx (integer)Total amount of bytes transmitted to the peer.

Application examples

Site to Site WireGuard tunnel

...