The auto-configuration feature assigns link-local IP addresses to WireGuard interfaces as well as configures several other common settings such as MTU, IP addresses or DNS settings.
Addresses are generated by concatenating a well-known network prefix (fe80::/64, 169.254.0.0/16) with an host part derived from the public key PK of the peer/interface using the 64-bit SipHash64 hashing function:
The following settings can be used in the main section of the configuration file or with-in the interfaces section to customize settings of an individual interface.
mtu
number (MTU)
The Maximum Transmission Unit (MTU) of the WireGuard interface.
If not specified, the MTU is automatically determined from the endpoint addresses or the system default route, which is usually a sane choice.
However, to manually specify an MTU to override this automatic discovery, this value may be specified explicitly.
addresses
Array of strings (Addresses)
A list of IP (v4 or v6) addresses (optionally with CIDR masks) to be assigned to the interface.
prefixes
Array of strings (Prefixes)
A list of prefixes which cunīcu uses to derive local addresses from the interfaces public key.
Array of IP Address (any) or IP Address (any) (DNS Servers)
A list of IP (v4 or v6) addresses to be set as the interface's DNS servers, or non-IP hostnames to be set as the interface's DNS search domains.
Upon bringing the interface up, this runs resolvconf -a tun.INTERFACE -m 0 -x and upon bringing it down, this runs resolvconf -d tun.INTERFACE.
If these particular invocations of resolvconf(8) are undesirable, custom hooks can be used instead.