WireGuard Setup Guide - ajgillis04/GillisDockerDepot GitHub Wiki
WireGuard Setup Guide
Introduction
WireGuard is a fast, modern, and secure VPN tunnel that provides ease of use and high performance. It is available for various platforms including Windows, Linux, macOS, iOS, and Android.
Prerequisites
- Docker installed (optional, for containerized setup)
- WireGuard installed on your system
Configuration Steps
Step 1: Installing WireGuard
- Windows: Download the installer from the official WireGuard website and follow the installation instructions.
- macOS: Download WireGuard from the App Store.
- Linux: Use your package manager to install WireGuard. For example, on Ubuntu:
sudo apt install wireguard
Useful Commands
Steps to Reset WireGuard Keys
Follow these steps to reset the private and public keys for a WireGuard peer:
-
Generate New Private Key:
wg genkey | tee /path/to/new_private_key
-
Generate New Public Key from Private Key:
- Note, if you get Permission denied set the permissions to write for the file.
wg pubkey < /path/to/new_private_key > /path/to/new_public_key
-
Update WireGuard Configuration File:
- Update your WireGuard configuration file (wg0.conf or similar) with the new keys.
-
Restart WireGuard Interface:
- Restart the WireGuard interface to apply the changes.
sudo wg-quick down wg0 sudo wg-quick up wg0
-
Update Peers:
- Inform the affected peer(s) to update their configuration with the new public key.