system/notes/vpn.md

28 lines
448 B
Markdown

# WireGuard
## Generate key pair
```sh
umask 077
wg genkey > ./private
wg pubkey < ./private > ./public
```
## Configuration
Then create QR code with configuration using the following command:
```sh
nix build -f ./misc/wg-client-conf.nix \
--argstr address "" \
--argstr dns "" \
--argstr privateKey "$(cat private)" \
--argstr serverPublicKey "" \
--argstr serverEndpoint ""
```
# References:
- https://nixos.wiki/wiki/WireGuard