Skip to content

Instantly share code, notes, and snippets.

@recklessop
Last active January 28, 2019 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save recklessop/580a9e5e3ccb4517567d957775b31cd1 to your computer and use it in GitHub Desktop.
Save recklessop/580a9e5e3ccb4517567d957775b31cd1 to your computer and use it in GitHub Desktop.
Wireguard Notes
One step keygen:
umask 077 # This makes sure credentials don't leak in a race condition.
wg genkey | tee privatekey | wg pubkey > publickey
Manual steps:
wg genkey
echo <private key> | wg pubkey
---------------------------------------------------------------------------
wg.conf
[Interface]
PrivateKey = oM3PZ1Htc7FnACoIZGhCyrfeR+Y8Yh34WzDaulNEjGs=
ListenPort = 5803
[Peer]
PublicKey = Jixsag44W8CFkKCIvlLSZF86/Q/4BovkpqdB9Vps5Sk=
EndPoint = [2001:db8:2::1]:5801
AllowedIPs = 0.0.0.0/0,::/0
---------------------------------------------------------------------------
Links:
https://vincent.bernat.ch/en/blog/2018-route-based-vpn-wireguard
https://bird.network.cz/
https://www.digitalocean.com/community/tutorials/how-to-create-a-point-to-point-vpn-with-wireguard-on-ubuntu-16-04
https://www.ericlight.com/wireguard-part-two-vpn-routing.html
https://www.stavros.io/posts/how-to-configure-wireguard/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment