blob: 55797aae08b95b539d43972f9893b4027e495f66 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# WireGuard Mesh Generator
This generates the WireGuard config for my f3s project. This script is run on my Fedora Linux laptop.
## Installation
```sh
bundler install
sudo dnf install -y wireguard-tools
```
## Usage
```sh
rake
```
It will generate the configs and scp the configs to the hosts
Result:
```sh
❯ find keys
keys
keys/f0
keys/f0/privkey
keys/f0/pubkey
keys/f1
keys/f1/privkey
keys/f1/pubkey
keys/f2
keys/f2/privkey
keys/f2/pubkey
keys/r0
keys/r0/privkey
keys/r0/pubkey
keys/r1
keys/r1/privkey
keys/r1/pubkey
keys/r2
keys/r2/privkey
keys/r2/pubkey
```
## Installation
### FreeBSD
```sh
doas freebsd-update fetch..... and so on... reboot
doas pkg update
doas pkg upgrade
reboot
doas pkg install wireguard-tools
doas mv wg0.conf /usr/local/etc/wireguard/
```
### Rocky Linux 9
```sh
dnf update -y
reboot
dnf install wireguard-tools
```
|