What's new

openvpn-event question

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

what are you trying to do?

that wiki page is meant to update tour dynamic ip with the external vpn ip address. is that what you want?
 
what are you trying to do?

that wiki page is meant to update tour dynamic ip with the external vpn ip address. is that what you want?

Yup. My dyndns account is updating to my ISP ip, not my vpn ip. Kinda makes my dyndns account pointless.


Sent from my iPhone using Tapatalk 2
 
Hello,

So you need to create "openvpn-event" under /jffs/scripts

create an "up.sh", with the code, modified to your host and password.

on the command prompt, under /jffs/scripts, run "chmod 700 *"

not sure what else you need.
 
Hello,

So you need to create "openvpn-event" under /jffs/scripts

create an "up.sh", with the code, modified to your host and password.

on the command prompt, under /jffs/scripts, run "chmod 700 *"

not sure what else you need.

So the up.sh is the openvpn-event script? If that's the case, then I got it.


Sent from my iPhone using Tapatalk 2
 
You call the up.sh script from the openvpn-event script.

ok, therein lies the issue. i don't know how to go about that. unfortunately, i know nothing about scripting, other than copying and pasting from those who know there stuff. :D
 
Hello,

How are you accessing your /jffs/scripts folder?

If you use winscp, with scp, you can upload and download files. You can also edit them so when you save it uploads it back, after entering your router password.


You need two files.
The first is /jffs/scripts/openvpn-event. It should contain at least one line:

Code:
 sh /jffs/scripts/up.sh &


then create /jffs/scripts/up.sh
Code:
#!/bin/sh

#keep looping until all the routing for the VPN tunnel is established

while [ ! -n  "`ifconfig | grep tun11`" ]; do
    sleep 1
done


#once established, get VPN IP

VPNIP=$(wget -qO - http://cfaj.freeshell.org/ipaddr.cgi)

sleep 10


#update dyndns with VPN IP

ez-ipupdate -S dyndns -u [I][B]user:password[/B][/I] -h [I][B]host[/B][/I].dyndns.org -a $VPNIP 

exit 0

then /jffs/scripts/chmod 700 *
 
...You need two files.
The first is /jffs/scripts/openvpn-event. It should contain at least one line:
Code:
 sh /jffs/scripts/up.sh &
...
Not quite correct, he needs 2 rows there:
Code:
#!/bin/sh
sh /jffs/scripts/up.sh &
Isn't just much easier to rename up.sh to openvpn-event (without extension!)? What is the reason for another script here?

@Noremacyug
You should read README-merlin.txt file, it's always included in fw archive. There is short but clear description of all user scripts. Good luck!
 
Thanks for the help. That makes more sense. I'll try to check it out tonight if I get a chance.


Sent from my iPhone using Tapatalk 2
 
well. the reason I put it in a separate script was so that the selective routing would finish and the openvpn-event script would complete and the up.sh would be forked and run in a separatw process in an infinite loop waiting for the vpn to come up.


feel free to try it that way though and report back if it works
 
well. the reason I put it in a separate script was so that the selective routing would finish and the openvpn-event script would complete and the up.sh would be forked and run in a separatw process in an infinite loop waiting for the vpn to come up.


feel free to try it that way though and report back if it works
again, thanks. followed your instructions and all looks to be working well. it updated my ip to my vpn's ip. however, for whatever reason, the aicloud app on my iPhone still won't connect. i'll have to look into this further, but I'm guessing my vpn service is blocking it somehow.
 
Last edited:
I could not get AICloud to work at the same time as openvpn client. What I ended up doing is running serviio pro on my desktop that is routed around openvpn. It costs $25, but it saved a lot of hassle.
 

Similar 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