tldr/pages/linux/wg.md

25 lines
527 B
Markdown
Raw Permalink Normal View History

2021-02-12 11:28:04 +00:00
# wg
> Manage the configuration of WireGuard interfaces.
> More information: <https://www.wireguard.com/quickstart/>.
- Check status of currently active interfaces:
`wg`
2021-02-12 11:28:04 +00:00
- Generate a new private key:
2021-02-12 11:28:04 +00:00
`wg genkey`
- Generate a public key from a private key:
2021-02-12 11:28:04 +00:00
`wg pubkey < {{path/to/private_key}} > {{path/to/public_key}}`
2021-02-12 11:28:04 +00:00
- Generate a public and private key:
`wg genkey | tee {{path/to/private_key}} | wg pubkey > {{path/to/public_key}}`
- Show the current configuration of a wireguard interface:
`wg showconf {{wg0}}`