You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added **finish** hook (which runs just before container exit)
7
+
- Added **persistent interface** option, so interface is persistently present on device (if using host networking mode) and firewall setup rules are executed **only once** (no ip tables mess) (#1)
8
+
- Logging chaned to stdout, no more log file by default
9
+
- Added **firewall disable** feature to disable all firewall related modifications
10
+
- Added `ìp6tables` & more permissions to *ip utils*
11
+
- Run OpenVPN only if config is present in `/config/openvpn/server` else **sleep forever** until config was setup & **CONTAINER RESTART**
Copy file name to clipboardExpand all lines: root/defaults/example/README.md
+27-2Lines changed: 27 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,12 +35,37 @@ config
35
35
Readme.md # Info about example, what to configure
36
36
```
37
37
38
+
### Hooks
39
+
40
+
- start hook file with
41
+
42
+
```bash
43
+
#!/usr/bin/with-contenv bash
44
+
45
+
source /app/lib/settings
46
+
source /app/lib/utils
47
+
```
48
+
49
+
- if hooks call any **firewall** related commands add after above code and before any commands
50
+
51
+
``` bash
52
+
# Check if firewall rules are disabled
53
+
useFW
54
+
if [ $?-eq 0 ];then
55
+
# Don't use fw rules
56
+
exit 0
57
+
fi
58
+
```
59
+
60
+
- also check the examples how persistent interface is handled, so you don't create iptables mess (running init, up script once, never call down, finish)
61
+
38
62
### Notes
39
63
40
64
- **DO NOT** use `dev` attribute, because it is set to static interface `tun0`.
41
65
- **DO NOT** use any script running directives, because they are probably already set in `system.conf` (except `auth-user-pass-verify` is commented out), but use hooks directory.
42
66
- **DO NOT** use log directives, because they are already set for `log` directory.
43
67
- Please name your hooks as `<number>-<name>` to ensure order of execution.
68
+
- If your hooks need access to container environment variables add `#!/usr/bin/with-contenv bash` at the top of the file.
44
69
45
70
### Wizard
46
71
@@ -49,7 +74,7 @@ User will call `ovpn_enconf CONFIG_NAME [wizard args]` to load your example in s
49
74
50
75
Then there are two options:
51
76
52
-
1. User manualy configure settigns in `/config/openvpn` folder
77
+
1. User manualy configure settings in `/config/openvpn` folder
53
78
2. Your **wizard** script, configures files which will be copied to `/config/openvpn`
54
79
- Configuration files are copied to temporary location (so they can be modified)
55
80
- `wizard` script will be called with temporary location as first argument `$1` (folder has same structure as in examples)
@@ -69,4 +94,4 @@ Hooks are located in `hook` directory. Please follow hook guidelines:
69
94
- What this hook does
70
95
- Setttings with comments and an example settings values
71
96
72
-
**Note:** All hooks run as non-root user so instead of using `ip` and `iptables` use `ovpn-ip` and `ovpn-iptables`.
97
+
**Note:** All hooks run as non-root user so instead of using `ip` and `iptables` use `ovpn-ip`, `ovpn-iptables`, `ovpn-ip6tables` (see [/root/usr/local/sbin](/usr/local/sbin)).
0 commit comments