aboutsummaryrefslogtreecommitdiff
path: root/net/wg-installer/wg-server/lib
Commit message (Collapse)AuthorAge
* wg-installer: create wireguard key if it does not existNick Hainke2022-01-20
| | | | | | | Check if the key exists which is given by option wg_key '/etc/wgserver/wg.key' Signed-off-by: Nick Hainke <vincent@systemli.org>
* wg-installer: check if a key is already insertedNick Hainke2022-01-20
| | | | | | | Check if a peer is already existing with a given public key. Introduce a response code for signaling why the server rejected the request. Signed-off-by: Nick Hainke <vincent@systemli.org>
* wg-installer: rework codeNick Hainke2022-01-20
| | | | | | | Use shellcheck to rework the code. Use "export" to return variables from a function call. Further, fix typos. Signed-off-by: Nick Hainke <vincent@systemli.org>
* wg-installer: cosmetic changesNick Hainke2022-01-18
| | | | | | Use "ip addr" instead of "ip addres" or "ip a". Signed-off-by: Nick Hainke <vincent@systemli.org>
* wg-installer: rework iproute2 commandsNick Hainke2022-01-16
| | | | | | | - Use ip address add instead of ip a a - Directly add broadcast address Signed-off-by: Nick Hainke <vincent@systemli.org>
* wg-installer: fix shell typoNick Hainke2022-01-12
| | | | Signed-off-by: Nick Hainke <vincent@systemli.org>
* wg-installer: generate new keys for every connectionNick Hainke2022-01-12
| | | | | | Generate new keys on every new connection. Signed-off-by: Nick Hainke <vincent@systemli.org>
* wg-installer: fix ipv4 meshing via olsrNick Hainke2022-01-08
| | | | | | The ipv4 address space was not allowed. Signed-off-by: Nick Hainke <vincent@systemli.org>
* wg-installer: add ipv4 supportNick Hainke2022-01-07
| | | | | | Add base_v4prefix to allow ipv4 mesh connections. Signed-off-by: Nick Hainke <vincent@systemli.org>
* wg-installer: delete old interfacesNick Hainke2021-03-14
| | | | | | | | | | Add "wg_check_interfaces" and specify a timeout in the config file. This allows to delete not used wireguard-interfaces automatically. For example a cronjob can be installed that calls: . /usr/share/wginstaller/wg_functions.sh && wg_check_interfaces Signed-off-by: Nick Hainke <vincent@systemli.org>
* wg-installer: fix get_usage functionNick Hainke2021-03-13
| | | | | | The get_usage function always returns 0. The shell syntax was wrong. Signed-off-by: Nick Hainke <vincent@systemli.org>
* wg-installer: add wg-installerNick Hainke2021-02-06
This tool can be used to automatically create wireguard tunnels. Using rpcd a new wireguard interface is created on the server where the client can connect to. Wiregurad server automatically installs a user and associated ACL to use the wireguard-installer-server features. The user is called wginstaller and so is the password. Get Usage: wg-client-installer get_usage --ip 127.0.0.1 --user wginstaller --password wginstaller Register Interface: wg-client-installer register --ip 127.0.0.1 --user wginstaller --password wginstaller --bandwidth 10 --mtu 1400 Signed-off-by: Nick Hainke <vincent@systemli.org>