Andre Kelpe
e782db30e9
Implements PostUp and PostDown commands using /bin/sh
...
This introduces PostUp and PostDown in dsnet. PostUp and PostDown allow
the user to run arbitrary commands after the device is up or down. These
are typically used to change the firewall rules via iptables. A working
example would be
...
"PostUp" : "iptables -A FORWARD -i dsnet -j ACCEPT; iptables -A FORWARD -o dsnet -j ACCEPT; iptables -t nat -A POSTROUTING -o ens2 -j MASQUERADE ",
"PostDown" : "iptables -D FORWARD -i dsnet -j ACCEPT; iptables -D FORWARD -o dsnet -j ACCEPT; iptables -t nat -D POSTROUTING -o ens2 -j MASQUERADE ",
...
All commands are executed by `/bin/sh` and no filtering or sandboxing is
applied. Users of this should know what they are doing.
Fixes https://github.com/naggie/dsnet/issues/16
2020-11-19 23:21:11 +01:00
Callan Bryant
38dd7c6d95
add IPv6 info to report
2020-11-02 18:26:14 +00:00
Callan Bryant
039cd4eb8b
add timestamp to report
2020-05-30 14:40:07 +01:00
Martin Eskdale Moen
ce1b1dd9ff
Added xmit bytes to interface report
2020-05-28 15:50:19 +01:00
Callan Bryant
fb9cc3d4e3
switch from status to online + dormant bool
2020-03-21 08:38:41 +00:00
Callan Bryant
c95e225de8
revise possible statuses
2020-03-20 23:12:19 +00:00
Callan Bryant
1e046a20a1
record added time
2020-03-19 20:12:42 +00:00
Callan Bryant
dd5ab03771
add external IP to peers
2020-03-15 16:54:48 +00:00
Callan Bryant
0e95b26b11
list peers last
2020-03-15 16:08:21 +00:00
Callan Bryant
fa01a74f6b
update definitions
2020-03-08 21:52:36 +00:00
Callan Bryant
17b0ad74ae
peer online count in report
2020-03-07 21:57:00 +00:00
Callan Bryant
13a8f58ab9
+ expired status
2020-03-06 22:57:05 +00:00
Callan Bryant
503427031b
fix timeout test
2020-03-06 22:52:33 +00:00
Callan Bryant
9068c861f5
add SI bytes TXRX
2020-03-06 22:32:04 +00:00
Callan Bryant
151de953b5
build index of old peer reports
2020-03-06 00:02:31 +00:00
Callan Bryant
3c8ba7e3bc
read old report for later use
2020-03-05 23:56:24 +00:00
Callan Bryant
8c5aaee793
compute peer status (incomplete)
2020-03-05 22:05:47 +00:00
Callan Bryant
f7123be3a4
working report with peers, not complete
2020-03-05 21:33:02 +00:00
Callan Bryant
c579372eaa
Revert "embed types without alias properly"
...
This reverts commit b7ed21f2ec
.
2020-03-05 20:59:56 +00:00
Callan Bryant
b7ed21f2ec
embed types without alias properly
2020-03-05 20:46:28 +00:00
Callan Bryant
5a71debc59
working (empty) report generation
2020-03-04 22:49:27 +00:00
Callan Bryant
e7fe33fe76
start implementation of report
2020-03-04 22:23:32 +00:00
Callan Bryant
4bb17e043f
start attempt at interface creation
2020-03-04 19:43:54 +00:00
Callan Bryant
909e6ed264
switch to status
2020-03-03 23:43:55 +00:00
Callan Bryant
c1c4cccce2
fmt
2020-03-03 23:41:55 +00:00
Callan Bryant
03b0a5d4fb
add comments on what statuses mean
2020-03-03 23:37:58 +00:00
Callan Bryant
dc703e20dc
remove hyphen
2020-03-03 23:32:07 +00:00
Callan Bryant
b87948de55
enable validation where appropriate
2020-03-03 23:09:54 +00:00
Callan Bryant
ca310b18ec
update report types with config changes
2020-03-03 21:22:37 +00:00
Callan Bryant
c2aac62f27
deal with private IP separately
2020-03-03 22:30:36 +00:00
Callan Bryant
5cc866fe77
separate config types from report types
2020-03-03 22:08:52 +00:00