tldr/pages/linux/wg.md

25 lines
537 B
Markdown
Raw 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:
2023-07-31 03:40:18 +01:00
`sudo 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:
2023-07-31 03:40:18 +01:00
`sudo wg showconf {{wg0}}`