Keeps user data in the same directory as the script itself. Preshared key is being used.
wgman.sh init external_ip:port vpn_subnet/mask extra_iface_masquarade 'extra_network/mask, extra_network2/mask'
eg. wgman.sh init example.com:51820 10.50.0.1/24 eth1 '172.16.20.0/24'
If extra_iface_masquarade is provided, traffic will be allowed from/to this interface to VPN clients, so it could be used to open internal company network to VPN clients; subnet of that network shall be passed as extra_networks/masks, so it will be included in the peer configs.
wgman.sh create username <IP>/32
wgman.sh delete username
wgman.sh show username
wgman.sh qr username
Joins partial peer configs, not needed as it's performed after each user add/delete operation.
wgman.sh regen
Removes all users and server configs, but not backups.
wgman.sh purge
After each action, in ./.backup/ directory, all configs are backed up.
(c) 2021 Rafal Rozestwinski, [email protected], license: GPLv3