system/notes/vpn.md

28 lines
448 B
Markdown
Raw Normal View History

2023-03-02 16:00:19 +03:00
# WireGuard
## Generate key pair
2023-03-02 16:00:19 +03:00
```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 ""
```
2023-03-02 16:00:19 +03:00
# References:
- https://nixos.wiki/wiki/WireGuard