Setup
generate keys
wg genkey | sudo tee /etc/wireguard/privatekeysudo wg pubkey < /etc/wireguard/privatekeyconfig
/etc/wireguard/wg0.conf
[Interface]
PrivateKey = <local private key>
ListenPort = 51820
Address = 10.0.4.4/32
[Peer]
PublicKey = <public key of the host machine>
PresharedKey = <preshared key of the host machine>
AllowedIPs = 0.0.0.0/0
Endpoint = <url or ip of host machine>:51820
PersistentKeepalive = 25Use
To start the VPN
sudo wg-quick up wg0To stop the VPN
sudo wg-quick down wg0