Skip to content

a simple wireguard vpn user management script

Notifications You must be signed in to change notification settings

adrianmihalko/wg_config

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a part of project:

https://github.com/adrianmihalko/raspberrypiwireguard

Be sure to read this first.

##############################################################################

This is a simple wireguard VPN user management script using on VPN server. Client config file and qrcode are generated.

dependency

  • wireguard
  • qrencode

config

The wireguard default config directory is /etc/wireguard. The script config file is wg.def, create and edit it according to wg.def.sample. You can generate the public key and private key with command wg genkey | tee > prikey | wg pubkey > pubkey.

usage

Running as root.

start wireguard

wg-quick up wg0

add a user

./user.sh -a alice

This will generate a client conf and qrcode in current directory which name is alice and add alice to the wg config.

delete a user

./user.sh -d alice

This will delete the alice directory and delete alice from the wg config.

view a user

./user.sh -v alice

This will show generated QR codes.

clear all

./user.sh -c

About

a simple wireguard vpn user management script

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 91.8%
  • Smarty 8.2%