Skip to content

WireGuard on OpenWrt: a kernel VPN set up as a network interface

Mainline since Linux 5.6; configured as a network interface.

WireGuard has been part of mainline Linux since 5.6, released on 2020-03-29. On OpenWrt it is a network protocol called wireguard, and you set it up like any other interface.

  • kmod-wireguard: the kernel module.
  • wireguard-tools: the wg command. It depends on the kernel module and registers the wireguard protocol with netifd.
  • luci-proto-wireguard: adds “WireGuard VPN” as a protocol when you create an interface in LuCI.
  • Server: reach your home network from outside.
  • Client: send the router’s traffic, or part of it, through a remote peer.

In both cases the tunnel is an interface in /etc/config/network. It needs a firewall zone, and on a server an open UDP port on WAN.

Terminal window
wg show
uci show network | grep wireguard

Sources

Router.Homes

Independent OpenWrt notes. Every page states the firmware, device, package manager and way back.

Icons: Solar by 480 Design, CC BY 4.0