Skip to content

Instantly share code, notes, and snippets.

View freespace's full-sized avatar

Steve Bian freespace

View GitHub Profile
@freespace
freespace / gist:7967697f5e26c7732040a39e87ce0fea
Last active April 6, 2025 14:05
Simple script to add a wireguard client and show the client config as a QR code for ease of client configuration.
#!/bin/bash
# Script to add a wireguard client. You need qrencode installed. By default clients are allowed to try to
# access the internet, though you will need to configure iptable rules and enable IP forwarding.
CONF_DIR="/etc/wireguard/clients"
SERVER_PUBLIC_KEY="/etc/wireguard/wg0.publickey"
SERVER_CONF="/etc/wireguard/wg0.conf"
SUBNET="192.168.90"
FIRST_CLIENT_IP="100"