What's new

Help with openvpn-event script when tun11 goes up/down

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

alwaysbless

New Around Here
Hey guys ive created two scripts that I want to use when either the tun11 interface goes up or goes down and ive been trying to call these scripts using the openvpn-event script but has so far been unsuccessful. Ive done some research and I found a template

if [ $script_type == "up" -a $vpn_interface == "tun11" ];
then

fi

if [ $script_type == "down" -a $vpn_interface == "tun11" ];
then

fi

but this does not seem to be working. When I run it get an error up/down: unknown operand. Im probably completely wrong in the scripts syntax but im a noob lol is there anyone who has a working template that wouldnt mind sharing with me or explaining what im doing wrong? Thx guys!
 
Here is a second method I have tested that is not working either -

---------

Please see this particular post, this is what I base mine script on:
http://forums.smallnetbuilder.com/sh...2&postcount=64

Note the additional openvpn options:
route-nopull < V important
script-security 2
route-up /jffs/scripts/vpn_route_up.sh

As per this thread my script is called vpn_route_up.sh , dont use the openvpn-event.

The script gets called by the additional option on the openvpn settings above.

Personally I use nano to create and edit files rather than mess about in windows and copying.


----------


It appears the command route-up is not recognized by my RTN66U because I can see this error in my syslogs

WARNING: Failed running command (--route-up): could not execute external program

I also chmod + x the script so permissions should be good. Im using the newest .43 fw does anyone else on this version have the same problem?
 
Last edited:

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top