create and manage wireguard networks
| rockspecs | Release v0.1.0 | |
| .gitignore | Initial Commit | |
| .luarc.json | Initial Commit | |
| LICENSE | Add license | |
| lwg-scm-0.rockspec | Add license | |
| main.lua | lwg(up|down): default to /etc/hostname for <servername> | |
| readme.md | Add readme.md | |
lwg
create and manage wireguard networks
Installation
Via luarocks
> luarocks install lwg
Usage
> lwg [-h] [-d <dir>] [--completion {bash,zsh,fish}] <command>
Options
-h, --help- Show this help message and exit.-d, --dir <dir>- config dir (default: /etc/lwg)--completion {bash,zsh,fish}- Output a shell completion script for the specified shell.
Commands
Managing Networks
unless given,
[network-name]defaults to the server's hostname (/etc/hostnameon the vpn server)
new-server [network-name] [client1-name, client2-name, ...]- Create a new server (vpn network) and add one or more clients to itadd-client <client1-name>[, client2-name, ...] [network-name]- Add one or more clients to[network-name]del-client <client1-name>[, client2-name, ...] [network-name]- Delete one or more clients from[network-name]join <network-name> <ssh-host>- Join the<network-name>vpn network hosted by<ssh-host>. Thelwg-tool must be present on the vpn server (<ssh-host>)
Connection Commands
status [network1-name, network2-name, ...]- Query the status of one or more vpn connectionsup [network1-name, network2-name, ...]- Start one or more vpn connectionsdown [network1-name, network2-name, ...]- Stop one or more vpn connections
License Information
lwg is licensed under the MIT License.
Created by Lesosoftware in 2025