..

+-------------------------------------------------------------------------------
| Running ${PKGSTEM} on OpenBSD
+-------------------------------------------------------------------------------

Creating an interface
=====================

# wireguard-go tun

This will create an interface and fork into the background. To remove the
interface, use the usual 'ifconfig tun0 destroy', or you may instead remove the
control socket via 'rm -f /var/run/wireguard/tun0.sock', which will result in
wireguard-go shutting down.

To run wireguard-go without forking to the background, pass '-f' or
'--foreground':

# wireguard-go -f tun

When an interface is running, you may use wg(8) (from the wireguard-tools
package) to configure it, as well as the usual ifconfig(8) commands.

To run with more logging you may set the environment variable 'LOG_LEVEL=debug'.

wireguard-go does not yet support sticky sockets on OpenBSD. Fwmark is mapped to
'SO_RTABLE'. Since the tun driver cannot have arbitrary interface names, you
must either use 'tun[0-9]+' for an explicit interface name or 'tun' to have the
program select one for you. If you choose 'tun' as the interface name, and the
environment variable 'WG_TUN_NAME_FILE' is defined, then the actual name of the
interface chosen by the kernel is written to the file specified by that
variable.