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
|
|
|
|
2021-10-14 04:24:01 +01:00
|
|
|
- Generate a new private key:
|
2021-02-12 11:28:04 +00:00
|
|
|
|
|
|
|
`wg genkey`
|
|
|
|
|
2021-10-14 04:24:01 +01:00
|
|
|
- Generate a public key from a private key:
|
2021-02-12 11:28:04 +00:00
|
|
|
|
2021-10-14 04:24:01 +01: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:
|
|
|
|
|
2021-10-14 04:24:01 +01:00
|
|
|
`wg genkey | tee {{path/to/private_key}} | wg pubkey > {{path/to/public_key}}`
|
2022-01-03 10:09:51 +00:00
|
|
|
|
|
|
|
- Show the current configuration of a wireguard interface:
|
|
|
|
|
2023-07-31 03:40:18 +01:00
|
|
|
`sudo wg showconf {{wg0}}`
|