2025-03-14 21:59:59 -06:00
|
|
|
# wg
|
|
|
|
|
|
|
|
|
|
> Manage the configuration of WireGuard interfaces.
|
|
|
|
|
> More information: <https://www.wireguard.com/quickstart/>.
|
|
|
|
|
|
|
|
|
|
- Check status of currently active interfaces:
|
|
|
|
|
|
|
|
|
|
`sudo wg`
|
|
|
|
|
|
|
|
|
|
- Generate a new private key:
|
|
|
|
|
|
|
|
|
|
`wg genkey`
|
|
|
|
|
|
|
|
|
|
- Generate a public key from a private key:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`wg < {{path/to/private_key}} pubkey > {{path/to/public_key}}`
|
2025-03-14 21:59:59 -06: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:
|
|
|
|
|
|
|
|
|
|
`sudo wg showconf {{wg0}}`
|