What's new

How do I use this script?

I have 5 VPN Clients & I would like it if I start with client 1 enabled and if that fails then it automatically tries client 2 and so on and so on. I tried the vpn mon script but that seems to break x3mrouting. I would like to know how to configure this https://github.com/MartineauUK/VPN-Failover?

Sorry it didn't work for you. I've never tried x3mrouting, so I'm not sure what it does. Once you've copied the VPN-Failover.sh into your /jffs/scripts folder, simply execute it like this:

Code:
sh VPN_Failover.sh 1 interval=60

This would be running in an SSH window and keep looping. As the docs say, it will check slot 1... if it's down, it would start slot 2, and down the line it goes in a round-robin fashion.

You could also run it as a cru job, and will run sporadically in the background... this runs the script at 5 past the hour, every hour, and basically accomplishes the same task:

Code:
cru a Chk_VPN1 "5 */1 * * * /jffs/scripts/VPN_Failover.sh 1"
 
Sorry it didn't work for you. I've never tried x3mrouting, so I'm not sure what it does. Once you've copied the VPN-Failover.sh into your /jffs/scripts folder, simply execute it like this:

Code:
sh VPN_Failover.sh 1 interval=60

This would be running in an SSH window and keep looping. As the docs say, it will check slot 1... if it's down, it would start slot 2, and down the line it goes in a round-robin fashion.

You could also run it as a cru job, and will run sporadically in the background... this runs the script at 5 past the hour, every hour, and basically accomplishes the same task:

Code:
cru a Chk_VPN1 "5 */1 * * * /jffs/scripts/VPN_Failover.sh 1"
after I copied the script I get -sh: ./VPN_Failover.sh: not found when I try to run sh VPN_Failover.sh 1 interval=60
 
after I copied the script I get -sh: ./VPN_Failover.sh: not found when I try to run sh VPN_Failover.sh 1 interval=60
Make sure you're in the same folder as the script when you run it... it's also case sensitive... or try:

Code:
sh /jffs/scripts/VPN_Failover.sh 1 interval=60
 

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!
Back
Top