My wireguard cheatsheet

I always search for this so I will write it down here.


cd /etc/wireguard
wg genkey | tee privatekey | wg pubkey > publickey
vi wg0.conf
PrivateKey = 
Address = 10.9.0.X/24

PublicKey = dg1cKCId81d6h5cWUQ61BMHksBbi0FdFnitjxDuOuno=
Endpoint =
AllowedIPs =
PersistentKeepalive = 25
wg-quick up /etc/wireguard/wg0.conf
systemctl enable wg-quick@wg0.service
systemctl edit wg-quick@wg0.service


systemctl stop wg-quick@wg0.service
vi /etc/wireguard/wg0
systemctl start wg-quick@wg0.service

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.