aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 40c81b03d7e378d3c87b1ead9b4273b0ced4f9c6 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
work in progress

Read local and remote decoded CAN messages I want, append to a file, plot to a GUI with some controls. Use it with [mycan](https://git.flylightning.xyz/mycan/).

build, install, and run
```sh
make
sudo make install
remote_plot
```

usage
```sh
# use default ssh destination
remote_plot
# use another ssh destination
remote_plot -d 10.0.0.7
# run locally
remote_plot -l
```

Infrastructure configs, some maybe included in pi_config dir
- I prefer manage infrastructure configs using my [cfg](https://git.flylightning.xyz/fsh/tree/sh/cfg) script, but that script is my personal project and I don't want to force people to use that, so I include those config files in this repo and I did not manage it with my cfg script on raspberry pi.
- raspberry pi
    - ~/.config/labwc/autostart autostart remote_plot locally
        - <https://wiki.archlinux.org/title/Labwc#Autostart>
    - /etc/wireguard/wg0.conf wireguard config
    - /etc/NetworkManager/system-connections/wg0.nmconnection, networkmanager wireguard config imported from wireguard config
    - /etc/modules-load.d/wireguard.conf autostart load wireguard kernel module, see <https://wiki.archlinux.org/title/Kernel_module#systemd>
    - /etc/nftables.conf nftables firewall configs
- server and laptop:
    - wireguard related configs
        - files in /etc/wireguard, see below
        - files in /etc/NetworkManager/system-connections
    - /etc/nftables.conf nftables firewall configs
        - server: <https://git.flylightning.xyz/config_local_arch/tree/etc/nftables.conf?h=ca>
        - laptop: <https://git.flylightning.xyz/config_local_arch/tree/etc/nftables.conf?h=master>

wireguard laptop configuration
```
# https://wiki.archlinux.org/title/WireGuard
# https://github.com/teddysun/across/blob/master/wireguard.sh
[Interface]
Address = 10.0.0.1/24, fdc9:281f:04d7:9ee9::1/64
PrivateKey = <secret>

[Peer]
PublicKey = <secret>
PresharedKey = <secret>
Endpoint = ca.flylightning.xyz:49432
AllowedIPs = 10.0.0.5/32, fdc9:281f:04d7:9ee9::5/128, 10.0.0.9/32, fdc9:281f:04d7:9ee9::9/128
PersistentKeepalive = 25
```

wireguard server configuration
```
[Interface]
Address = 10.0.0.5/24, fdc9:281f:04d7:9ee9::5/64
ListenPort = 49432
PrivateKey = <secret>

[Peer]
PublicKey = <secret>
PresharedKey = <secret>
AllowedIPs = 10.0.0.1/32, fdc9:281f:04d7:9ee9::1/128

[Peer]
PublicKey = <secret>
PresharedKey = <secret>
AllowedIPs = 10.0.0.9/32, fdc9:281f:04d7:9ee9::9/128
```

wireguard raspberry pi configuration (/etc/wireguard/wg0.conf)
```
[Interface]
Address = 10.0.0.9/24, fdc9:281f:04d7:9ee9::9/64
PrivateKey = <secret>

[Peer]
PublicKey = <secret>
PresharedKey = <secret>
Endpoint = ca.flylightning.xyz:49432
AllowedIPs = 10.0.0.5/32, fdc9:281f:04d7:9ee9::5/128, 10.0.0.1/32, fdc9:281f:04d7:9ee9::1/128
PersistentKeepalive = 25
```