Manual.. sure. It sucks
Share some thoughts... script calls upon domain_vpn_routing.conf file... I see that policy and tun are "hard coded" if u will in that file.
router|/jffs/configs/domain_vpn_routing/policy_router_domainlist|/jffs/configs/domain_vpn_routing/policy_router_domaintoIP|tun11|VERBOSELOGGING=1|PRIVATEIPS=0
Wondering if tun11 can be changed to a variable that reads current tunXX instead in the default.vpn_conf file?
OR OPENVPN allows scripts after tun up/down... thoughts
Can create multiple domain_vpn_routing.conf files, 1 for each VPN interface... that can be executed after tun up in each of .ovpn config file.
client1:
up /jffs/scripts/domain_based_routing.sh -conf domain_vpn_routing.conf1.conf
client2:
up /jffs/scripts/domain_based_routing.sh -conf domain_vpn_routing.conf2.conf
client3:
up /jffs/scripts/domain_based_routing.sh -conf domain_vpn_routing.conf3.conf
default_vpn_
conf1.conf would have: router|/jffs/configs/domain_vpn_routing/policy_router_domainlist|/jffs/configs/domain_vpn_routing/policy_router_domaintoIP|
tun11|VERBOSELOGGING=1|PRIVATEIPS=0
default_vpn_
conf2.conf would have: router|/jffs/configs/domain_vpn_routing/policy_router_domainlist|/jffs/configs/domain_vpn_routing/policy_router_domaintoIP|
tun12|VERBOSELOGGING=1|PRIVATEIPS=0
default_vpn_
conf3.conf would have: router|/jffs/configs/domain_vpn_routing/policy_router_domainlist|/jffs/configs/domain_vpn_routing/policy_router_domaintoIP|
tun13|VERBOSELOGGING=1|PRIVATEIPS=0
Catch my drift? I no coder, so would not know how to modify you script.
Thank you for patience and annoyance.
--script-security level [method]
This directive offers policy-level control over OpenVPN’s usage
of external programs and scripts. Lower level values are more
restrictive, 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).
--up cmd
Shell command to run after successful TUN/TAP device open (pre
--user UID change). The up script 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 Order of Execution
--up Executed after TCP/UDP socket bind and TUN/TAP open.
--down Executed after TCP/UDP and TUN/TAP close.