Commit graph

14 commits

Author SHA1 Message Date
Nick Hainke
5e8301d7dc wg-installer: fix using symlinks for conf files
It is useful to symlink babeld and olsrd to /tmp/ if we frequently
write to those config files.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-01-11 00:27:43 +01:00
Nick Hainke
e6afcf8f3c wg-installer: fix cleanup script
The wrong function was called.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-01-10 13:32:20 +01:00
Nick Hainke
0e416dadd1 wg-installer: fix typo in cleanup function
The delete variable was misspelled leading to devices always being
removed although they had connected neighbors.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-01-09 13:33:03 +01:00
Nick Hainke
714b51c630 wg-installer: add cleanup script
Add script to cleanup unused wireguard interfaces.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-01-09 10:21:44 +01:00
Nick Hainke
4302bfd3c8 wg-installer: fix ipv4 meshing via olsr
The ipv4 address space was not allowed.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-01-08 22:30:47 +01:00
Nick Hainke
98d8680a8c wg-installer: add ipv4 support
Add base_v4prefix to allow ipv4 mesh connections.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-01-07 08:04:00 +01:00
Nick Hainke
d35c22951b wg-installer: add hotplug script for olsr
Add hotplug-olsrd to automatically mesh with olsrd via new wireguard
links.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-01-06 22:24:08 +01:00
Huangbin Zhan
94d57346fc treewide: add missing conffiles
Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
2021-10-27 23:18:42 -07:00
Nick Hainke
62cc627aba wg-installer: fix dependencies
Signed-off-by: Nick Hainke <vincent@systemli.org>
2021-09-07 08:49:41 +02:00
Nick Hainke
36dc9b3f79 wg-installer: delete old interfaces
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>
2021-03-14 11:27:07 +01:00
Nick Hainke
f7cb8b20e1 wg-installer: fix get_usage function
The get_usage function always returns 0. The shell syntax was wrong.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2021-03-13 21:21:20 +01:00
Nick Hainke
625f3c8302 wg-installer: add link-local to client interface
Wireguard has no link-local address on an interface automatically.
Add a link-local to the interface. The server has fe80::1/64 and
the client fe80::2/64.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2021-03-06 11:16:38 +01:00
Nick Hainke
3ebc568f18 wg-installer: add babeld hotplug.d script
Add a hotplug.d-extension that automatically configures babeld for
meshing via wireguard interfaces.

It checks for "add" and "remove" of a wireguard interface with name
"wg_*". Depending on the action, it removes it from the babeld config
or adds the interface and reloads babeld.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2021-02-08 11:38:36 +01:00
Nick Hainke
3a6949dfaf wg-installer: add wg-installer
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>
2021-02-06 22:41:29 +01:00