What's new

Openvpn-event

  • 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!

djktopdj

New Around Here
hey, i tried to use the openvpn-event script...

what i want it to do is while im connecting with a device with openvpn to my router... i want it to send me a mail..

i have made 2 files and made them exec...

1. openvpn-event
2. email-vpnup.sh

the email-vpnup.sh is working great. if triggered manually im getting the mail.

** if ill go in to putty and change dir to /jffs/scripts and trigger openvpn-event i will get the mail.

but i cant get the openvpn-event to triger when a user connected via open vpn to the router :(


what i wrote in 1. openvpn-event is:
______________________________________________________
#!/bin/sh

#script Mailing router Open-VPN status after event accured
sh /jffs/scripts/email-vpnup.sh&

______________________________________________________

BTW im using the last Firmware:3.0.0.4.374.38 (Merlin build)

please help :) :confused:
 
Last edited:
Test the event script with something simpler, like a simple touch command to see if it does get invoked at all.

Don't forget to ensure it's set as executable too.
 
merlin thanks for the quick reply ++ for all of your work...


im a little big noob :) dont know how to do the touch thing...

but both of the scripts working when manually activated in puty..

forther more, when the vpn settings changed (from gui) or when the router rebooted - the email does sent over to me.

the question here is how to trigger the event when a user make a connection thru the open-vpn ?

** btw in the older versions i have worked with pptp - in there it was simple. just edit the pptp\upstate and add a line to call the script.
the downside - i had to add this line manually every time i reboot the router + pptp is less secure...

so.... any idea how to trigger the bastard ;) ?
 
hi, on my openvpn windows and android clients, i see 'STATE' instead of 'EVENT' in the logs, i'm wondering if 'EVENT' is for an older version of openvpn and the openvpn-event script doesn't work anymore.

https://forums.openvpn.net/topic11988.html << here i can see they get the 'EVENT' rather than state.
 
Last edited:
additionally; i tried setting verb 5 on the openvpn server, and i didn't see either STATE or EVENT, which leads me to believe the openvpn-event script is intended for using the router as a client rather than the server
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

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