What's new

Domain-based VPN Routing Script

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

return on empty, both before and after, so it break somewhere even without reboot the device. I just play with few hours and just notice that it didn't engage. This only happen to the AC86U, so it might be device relate?
Can you send me the full script you have in openvpn-event?

Also if you manually run
Code:
/jffs/scripts/domain_vpn_routing.sh cron
does it create the cron job in
Code:
cru l
?
 
Can you send me the full script you have in openvpn-event?

Also if you manually run
Code:
/jffs/scripts/domain_vpn_routing.sh cron
does it create the cron job in
Code:
cru l
?
openvpn-event

sh /jffs/scripts/domain_vpn_routing.sh cron # domain_vpn_routing

sh /jffs/scripts/domain_vpn_routing.sh querypolicy all # domain_vpn_routing_queryall

Code:
cru l
show up empty.

I usually do
Code:
crontab -l
command and it did show one line before when I first use it. */5 * * * * ......
Now nothing
 
openvpn-event

sh /jffs/scripts/domain_vpn_routing.sh cron # domain_vpn_routing

sh /jffs/scripts/domain_vpn_routing.sh querypolicy all # domain_vpn_routing_queryall

Code:
cru l
show up empty.

I usually do
Code:
crontab -l
command and it did show one line before when I first use it. */5 * * * * ......
Now nothing

openvpn-event

sh /jffs/scripts/domain_vpn_routing.sh cron # domain_vpn_routing

sh /jffs/scripts/domain_vpn_routing.sh querypolicy all # domain_vpn_routing_queryall

Code:
cru l
show up empty.

I usually do
Code:
crontab -l
command and it did show one line before when I first use it. */5 * * * * ......
Now nothing
Well that would explain why your cronjobs aren't creating? What model and firmware are you using? Also when you run openvpn-event does it perform the querypolicy all for you?
 
Well that would explain why your cronjobs aren't creating? What model and firmware are you using? Also when you run openvpn-event does it perform the querypolicy all for you?
AC68U 386.5_2
AC86U 387.Beta1
Internet source is a hotspot Franklin T9 on both
purpose is bypass streaming throttling
how do I run the openvpn-event?
looking at the Log
ovpn-client2[2573]: RESOLVE: Cannot resolve host address: xxxxxx.xxxxxx.xxx:xxxx (Temporary failure in name resolution)
maybe because this?
 
AC68U 386.5_2
AC86U 387.Beta1
Internet source is a hotspot Franklin T9 on both
purpose is bypass streaming throttling
how do I run the openvpn-event?
looking at the Log
ovpn-client2[2573]: RESOLVE: Cannot resolve host address: xxxxxx.xxxxxx.xxx:xxxx (Temporary failure in name resolution)
maybe because this?
Just execute it in the command console.
Code:
/jffs/scripts/openvpn-event
 
-sh: /jffs/scripts/openvpn-event: Permission denied
Was your openvpn-event script created during the install of my script? It should set the permission for it if so, it appears it was created prior to install and it does not have the correct permissions to run. Set the permission to allow it be executed with this command.
Code:
chmod 755 /jffs/scripts/openvpn-event
 
I think it create with the script I didn't ssh until I'm playing with your script.

speekkong@RT-AC68U-DFE0:/tmp/home/root# /jffs/scripts/openvpn-event
: not foundts/openvpn-event: line 1:
domain_vpn_routing.sh - Cron Job
crontab: can't open 'speekkong': No such file or directory
Creating cron jobs...
Completed creating cron job.
: not foundts/openvpn-event: line 3:
domain_vpn_routing.sh - Query Policy
 
I think it create with the script I didn't ssh until I'm playing with your script.

speekkong@RT-AC68U-DFE0:/tmp/home/root# /jffs/scripts/openvpn-event
: not foundts/openvpn-event: line 1:
domain_vpn_routing.sh - Cron Job
crontab: can't open 'speekkong': No such file or directory
Creating cron jobs...
Completed creating cron job.
: not foundts/openvpn-event: line 3:
domain_vpn_routing.sh - Query Policy
Ah I see the problem....yea I forgot to add in the step for it to create the script...it created it by adding the lines, I will fix in a patch. You should be good by adding this to the top line of the script.
Code:
#!/bin/sh
 
v1.1-beta Release: To use the beta use the following command to replace your production version of the script.
Code:
/usr/sbin/curl -s "https://raw.githubusercontent.com/Ranger802004/asusmerlin/main/domain_vpn_routing/domain_vpn_routing_v1.1-beta.sh" -o "/jffs/scripts/domain_vpn_routing.sh" && chmod 755 /jffs/scripts/domain_vpn_routing.sh

To revert back to production release:
Code:
/jffs/scripts/domain_vpn_routing.sh update

Release Notes:
v1.1-beta
- Added logic during install to create openvpn-event if it doesn't exist.
- Added warning message when executing querypolicy if it is already currently running.
 
Last edited:
You should be good by adding this to the top line of the script.
Code:
#!/bin/sh
Very weird after adding

speekkong@RT-AC68U-DFE0:/tmp/home/root# /jffs/scripts/openvpn-event
-sh: /jffs/scripts/openvpn-event: not found

the script is there, but say not found. Remove the line it work and same output like before.
 
Very weird after adding

speekkong@RT-AC68U-DFE0:/tmp/home/root# /jffs/scripts/openvpn-event
-sh: /jffs/scripts/openvpn-event: not found

the script is there, but say not found. Remove the line it work and same output like before.
Try deleting openvpn-event and recreate it by running the install command from my script. It should leave your existing policy data alone.
 
yup just did that and it did create a duplicate line again.
Duplicate where? Is it executing openvpn-event now?

EDIT:
I meant to specify using the new v1.1-beta release I just published for running install.
 
Duplicate where? Is it executing openvpn-event now?

EDIT:
I meant to specify using the new v1.1-beta release I just published for running install.
yup using your newest v1.1-beta, del the openvpn-event, re-run install,
openvpn-event

#!/bin/sh

sh /jffs/scripts/domain_vpn_routing.sh cron # domain_vpn_routing

sh /jffs/scripts/domain_vpn_routing.sh querypolicy all # domain_vpn_routing

sh /jffs/scripts/domain_vpn_routing.sh querypolicy all # domain_vpn_routing_queryall
 
yup using your newest v1.1-beta, del the openvpn-event, re-run install,
openvpn-event

#!/bin/sh

sh /jffs/scripts/domain_vpn_routing.sh cron # domain_vpn_routing

sh /jffs/scripts/domain_vpn_routing.sh querypolicy all # domain_vpn_routing

sh /jffs/scripts/domain_vpn_routing.sh querypolicy all # domain_vpn_routing_queryall
I see why's it doing that now...I will correct that but it should be harmless. If you run openvpn-event does it properly execute now?

EDIT: I modified the v1.1-beta release (Quick fix) to remedy this issue. Just delete the middle entry and should be good now.
 
Yes, it work other than line 2,4,6 not foundts. I'm gonna test for few hours then reboot to see if all stick.
 
Yes, it work other than line 2,4,6 not foundts. I'm gonna test for few hours then reboot to see if all stick.
That's strange...that's coming from your openvpn-event execution?
 
That's strange...that's coming from your openvpn-event execution?
Yeah, but I think it because the line are blank?

: not foundts/openvpn-event: line 2:
domain_vpn_routing.sh - Cron Job
: not foundts/openvpn-event: line 4:
domain_vpn_routing.sh - Query Policy
: not foundts/openvpn-event: line 6:
 
Yeah, but I think it because the line are blank?

: not foundts/openvpn-event: line 2:
domain_vpn_routing.sh - Cron Job
: not foundts/openvpn-event: line 4:
domain_vpn_routing.sh - Query Policy
: not foundts/openvpn-event: line 6:
That shouldn't matter, I have spaces in mine and it executes fine. Send me the full output of your openvpn-event script please. Also what version and firmware are you on?
 

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!

Staff online

Top