1.8 KiB
1.8 KiB
SeaBee's WireGuard Helper Script
This Python script simplifies the installation and management of a WireGuard VPN server, including client configuration.
🔧 Features
- Installs WireGuard and required dependencies
- Generates server and peer key pairs
- Edits and manages the WireGuard config file (
wg0.conf) - Stores configuration data in a JSON file for easy reuse
- Allows editing the server endpoint
- Starts a temporary web admin panel for WireGuard management
- Automatically opens port
51820using UFW (if enabled)
📦 Requirements
- Python 3
- Flask (
sudo apt install python3-flaskorpip install flask) - A Linux-based system
- Internet connection
⚠️ Note: This script has been tested on debain and may not work on your machine
🚀 Installation & Usage
- Ensure you have all dependencies
sudo apt install curl python3-flask -y
- Download and run the script
curl -L -o wg_helper.py https://raw.githubusercontent.com/seabee33/wireguard_helper/main/wg_helper.py
-
Set the admin password on line 10 of the file:
ADMIN_PASSWORD = "your_secure_password_here" -
Run the script with sudo or as root
sudo python3 wg_helper.py -
Access the web panel: Open your browser and go to:
http://<SERVER_IP>:5050and go through the easy setup steps:
Setup once web panel loaded
- Install and activate necessary software in system status (Install wireguard, autostart wireguard at boot, install iptables, Open Port 51820 if ufw is installed)
- Fill in endpoint in options
- generate keys
- Add peers with a unique name
- download peer config and connect on client device
- Don't forget to port forward your server on your modem! (port 51820)