Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface WgConfigInterface

Defines the VPN settings for the local node.

Hierarchy

  • WgConfigInterface

Index

Properties

Optional address

address: string[]

Defines what address range the local node should route traffic for. Depending on whether the node is a simple client joining the VPN subnet, or a bounce server that's relaying traffic between multiple clients, this can be set to a single IP of the node itself (specified with CIDR notation), e.g. 192.0.2.3/32), or a range of IPv4/IPv6 subnets that the node can route traffic for.

Optional dns

dns: string[]

The DNS server(s) to announce to VPN clients via DHCP, most clients will use this server for DNS requests over the VPN, but clients can also override this value locally on their nodes

Optional listenPort

listenPort: number

When the node is acting as a public bounce server, it should hardcode a port to listen for incoming VPN connections from the public internet. Clients not acting as relays should not set this value.

Optional mtu

mtu: number

Optionally defines the maximum transmission unit (MTU, aka packet/frame size) to use when connecting to the peer, not necessary to configure for most setups. The MTU is automatically determined from the endpoint addresses or the system default route, which is usually a sane choice.

Optional name

name: string

This is just a standard comment in INI syntax used to help keep track of which config section belongs to which node, it's completely ignored by WireGuard and has no effect on VPN behavior.

Optional postDown

postDown: string[]

Optionally run bash commands after the interface is brought down. These will be added to the config file in order and executed in order. Position 0 in array will be run first.

Optional postUp

postUp: string[]

Optionally run bash commands after the interface is brought up. These will be added to the config file in order and executed in order. Position 0 in array will be run first.

Optional preDown

preDown: string[]

Optionally run bash commands before the interface is brought down. These will be added to the config file in order and executed in order. Position 0 in array will be run first.

Optional preUp

preUp: string[]

Optionally run bash commands before the interface is brought up. These will be added to the config file in order and executed in order. Position 0 in array will be run first.

Optional privateKey

privateKey: string

This is the private key for the local node, never shared with other servers. All nodes must have a private key set, regardless of whether they are public bounce servers relaying traffic, or simple clients joining the VPN.

Optional table

table: string

Optionally defines which routing table to use for the WireGuard routes, not necessary to configure for most setups. There are two special values: -‘off’: disables the creation of routes altogether, and -‘auto’: (the default if omitted) adds routes to the default table and enables special handling of default routes.

Generated using TypeDoc