Commit graph

10 commits

Author SHA1 Message Date
Nick Hainke
40b87aac95 wg-installer: use babeld add_interface function
With commit 385200443554 ("babeld: add add_interface function") babeld
has a new ubus function allowing to dynamically add an interface.

Before the add_interface function, we were required to reload babeld.
The reload influenced the babeld routing. However, the remove part is
still missing and will be added at a later stage.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-02-01 22:32:30 +01:00
Nick Hainke
fab86eb626 wg-installer: remove unused dependency
Remove the dependency "coreutils-realpath" from
wg-installer-server-hotplug-olsrd.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-01-20 15:56:02 +01:00
Nick Hainke
324fa79d7c wg-installer: create wireguard key if it does not exist
Check if the key exists which is given by
    option wg_key '/etc/wgserver/wg.key'

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-01-20 14:44:26 +01:00
Nick Hainke
432a965689 wg-installer: install cronjob
Install a cronjob that removes unused wireguard interfaces every 10
minutes.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-01-20 09:51:05 +01:00
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
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
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