--up cmd Run command cmd after successful TUN/TAP device open (pre --user UID change).
cmd consists of a path to script (or executable program), optionally followed by arguments. The path and arguments may be single- or double-quoted and/or escaped using a backslash, and should be separated by one or more spaces.
The up command is useful for specifying route commands which route IP traffic destined for private subnets which exist at the other end of the VPN connection into the tunnel.
script-security: 设置为2后就可以执行用户指定的脚本了:
1 2 3 4 5 6 7 8
--script-security level This directive offers policy-level control over OpenVPN's usage of external programs and scripts. Lower level values are more restric‐ tive, higher values are more permissive. Settings for level:
0 -- Strictly no calling of external programs. 1 -- (Default) Only call built-in executables such as ifconfig, ip, route, or netsh. 2 -- Allow calling of built-in executables and user-defined scripts. 3 -- Allow passwords to be passed to scripts via environmental variables (potentially unsafe).