Ever worried about connection failures in Steam Remote Play or Parsec, etc., when partying with your friends? Or ever somehow having troubles establishing SSR tunnel connections under abysmal network conditions to overseas servers? A self-hosted home Wireguard node might just be the solution.

Wireguard is a open-source software and a communication protocol that transmits data traffic in UDP tunnels, aiming to provide faster and more stable connections than IPsec and OpenVPN. It's asymmetric encryption process entails implementations of miscellaneous cryptography protocols, including Noise protocol framework, Curve25519, ChaCha20, Poly1305, BLAKE2, SipHash24, HKDF, etc..

Setting up Your own Home VPN Service - The Wireguard Solution Based on OpenWRT

Deployment

Dependencies

Make sure you have the following plugins installed on your OpenWRT:

wireguard-tools
kmod-wireguard
luci-app-wireguard
luci-proto-wireguard


Run the following command to install if needed:

opkg update
opkg install luci-proto-wireguard
opkg install luci-app-wireguard
opkg install kmod-wireguard
opkg install wireguard-tools
reboot

Generate Keys & Luci Configuration

Note that Wireguard uses an asymmetric encryption method (plus an optional symmtric key addon), so public keys, private keys and pre-shared keys need to be set up for each node (the "server" side is also a node).

Keys for the Server Side

Create Directory

mkdir wireguard #Create a folder for the node
cd wireguard

Generate Keys

umask 077 #Set permission level
wg genkey | tee sprivatekey | wg pubkey > spublickey #Generate keys, "sprivatekey" stands for server-privatekey and "spublickey" means the counterpart
cat sprivatekey #Check and save the keys for later use
cat spublickey

Luci Settings

WireGuard VPN Configurations