Posts

Showing posts from June, 2021

Wireguard VPN Notes

Notes on how to put multiple peers in the same virtual private network with Wireguard on Linux. Install the Wireguard tools, including wg-quick and probably some service definitions for it for the computer's service supervision suite. Its configuration seems to lie in /etc/wireguard/wg0.conf by default. That folder should exist with appropriate permissions, but the file probably won't. If running wg-quick manually, the wg0 portion must be specified explicitly anyway, so it could be different. When needed, generate private keys with $ wg genkey pre-shared keys with $ wg genpsk and public keys from private keys with $ wg pubkey <the private key> ^D (CTRL+D) or something like $ echo <the private key> | wg pubkey but only on a trusted machine, and it's still best to make sure it stays out of the command history, e.g.: $ HISTCONTROL=ignorespace $ <some whitespace> echo <the private key> | wg pubkey Being careless with public keys is mostly fine, but pr