2021-02-12 13:28:04 +02:00
|
|
|
# wg
|
|
|
|
|
|
|
|
> Manage the configuration of WireGuard interfaces.
|
|
|
|
> More information: <https://www.wireguard.com/quickstart/>.
|
|
|
|
|
|
|
|
- Check status of currently active interfaces:
|
|
|
|
|
2023-07-31 05:40:18 +03:00
|
|
|
`sudo wg`
|
2021-02-12 13:28:04 +02:00
|
|
|
|
2021-10-13 23:24:01 -04:00
|
|
|
- Generate a new private key:
|
2021-02-12 13:28:04 +02:00
|
|
|
|
|
|
|
`wg genkey`
|
|
|
|
|
2021-10-13 23:24:01 -04:00
|
|
|
- Generate a public key from a private key:
|
2021-02-12 13:28:04 +02:00
|
|
|
|
2021-10-13 23:24:01 -04:00
|
|
|
`wg pubkey < {{path/to/private_key}} > {{path/to/public_key}}`
|
2021-02-12 13:28:04 +02:00
|
|
|
|
|
|
|
- Generate a public and private key:
|
|
|
|
|
2021-10-13 23:24:01 -04:00
|
|
|
`wg genkey | tee {{path/to/private_key}} | wg pubkey > {{path/to/public_key}}`
|
2022-01-03 15:39:51 +05:30
|
|
|
|
|
|
|
- Show the current configuration of a wireguard interface:
|
|
|
|
|
2023-07-31 05:40:18 +03:00
|
|
|
`sudo wg showconf {{wg0}}`
|