What's new

VPNMON VPNMON-R2 v2.52 -Mar 27, 2023- Monitor your VPN connection's Health (Thread locked/closed)

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

@JAX1337 probably a bit Off-Topic but out of interest what do you have as your "wan-failover.sh" settings? Any chance you could list them?
Hoping to have a proper play with VPNMON-R2/Dual WAN Failover sometime in the next week or so, probably when @Viktor Jaep releases the results of his "playing", and I'm trying to work out some sane starting settings to use to configure it up with a 4G USB Dongle as my secondary standby WAN.
I'm actually really looking forward to testing dual-wan tomorrow. Like a kid the night before Christmas right now. Lol
 
but I'd rather leave it to the built-in functionality or the specialized scripts like @Ranger802004's, which can handle that function much more gracefully
Looking forward to what the weekend would bring. Hope you can test out all scenarios.

Edit:

As of now, there seems to be some issue as the script stopped working after 6 hrs, could not figure out much from logs as well

Code:
Fri Jul 15 14:43:05 IST 2022 - VPNMON-R2 ----------> WARNING: AVG PING across VPN tunnel > 100 ms - Executing VPN Reset
Fri Jul 15 14:43:05 IST 2022 - VPNMON-R2 - Executing VPN Reset
Fri Jul 15 14:43:09 IST 2022 - VPNMON-R2 - Killed all VPN Client Connections
Fri Jul 15 14:43:41 IST 2022 - VPNMON-R2 - Updated Skynet Whitelist
Fri Jul 15 14:43:41 IST 2022 - VPNMON-R2 - VPN1 Client ON - Lowest PING of 5 VPN slots
Fri Jul 15 14:43:43 IST 2022 - VPNMON-R2 - VPN Reset Finished
Fri Jul 15 14:43:46 IST 2022 - VPNMON-R2 - Trimmed the log file down to 1000 lines
Fri Jul 15 14:43:46 IST 2022 - VPNMON-R2 - Resuming normal operations
Fri Jul 15 14:43:47 IST 2022 - VPNMON-R2 - API call made to update WAN0 city to Mumbai
Fri Jul 15 14:44:17 IST 2022 - VPNMON-R2 - API call made to update WAN city to Mumbai
Fri Jul 15 14:44:18 IST 2022 - VPNMON-R2 - API call made to update VPN city to Singapore
Fri Jul 15 15:12:42 IST 2022 - VPNMON-R2 ----------> ERROR: VPN1 Ping/HTTP response failed
Fri Jul 15 15:12:57 IST 2022 - VPNMON-R2 ----------> ERROR: Connection failed - Executing VPN Reset
Fri Jul 15 15:12:57 IST 2022 - VPNMON-R2 - Executing VPN Reset
Fri Jul 15 15:13:02 IST 2022 - VPNMON-R2 - Killed all VPN Client Connections
Fri Jul 15 15:13:34 IST 2022 - VPNMON-R2 - Updated Skynet Whitelist
Fri Jul 15 15:13:34 IST 2022 - VPNMON-R2 - VPN3 Client ON - Lowest PING of 5 VPN slots
Fri Jul 15 15:13:36 IST 2022 - VPNMON-R2 - VPN Reset Finished
Fri Jul 15 15:13:39 IST 2022 - VPNMON-R2 - Trimmed the log file down to 1000 lines
Fri Jul 15 15:13:39 IST 2022 - VPNMON-R2 - Resuming normal operations
Fri Jul 15 15:13:40 IST 2022 - VPNMON-R2 - API call made to update WAN0 city to Mumbai
Fri Jul 15 15:14:11 IST 2022 - VPNMON-R2 - API call made to update WAN city to Mumbai
Fri Jul 15 15:14:12 IST 2022 - VPNMON-R2 - API call made to update VPN city to Singapore
Fri Jul 15 15:50:17 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 15:51:17 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 15:52:17 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 15:53:17 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 15:54:17 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 15:55:17 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 15:56:17 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 15:57:17 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 15:58:17 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 15:59:18 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 16:00:18 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 16:01:18 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 16:02:18 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 16:03:18 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 16:04:18 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 16:05:18 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 16:06:18 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 16:07:18 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 16:08:18 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 16:09:18 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 16:10:18 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 16:11:18 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 16:12:18 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 16:13:18 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 16:14:18 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 16:15:18 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
Fri Jul 15 16:16:18 IST 2022 - VPNMON-R2 ----------> ERROR: WAN CONNECTIVITY ISSUE DETECTED
 
Last edited:
I didn't realize there was an issue as the VPN server was running, Realized it just now when I was checking screen @Viktor Jaep
 
What was happening on the UI at the time?
Nothing is visible, full black, Initial command line reset didn't fix it, had to do it twice, then it started working again for now.

Will try overnight and see
 
Nothing is visible, full black, Initial command line reset didn't fix it, had to do it twice, then it started working again for now.

Will try overnight and see
Wow, can't say I've ever seen it do that! Thanks for the report! :)
 
I made some changes... could you please try v2.01b6?

Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R2/master/vpnmon-r2-2.01b6.sh" -o "/jffs/scripts/vpnmon-r2.sh" && chmod a+rx "/jffs/scripts/vpnmon-r2.sh"
Hi, I'm travelling, has soon as I get back, i will try it and give you feedback.
 
Hi, I'm travelling, has soon as I get back, i will try it and give you feedback.
Thanks for the follow-up! Beta 7 is the latest right now, but there's a good chance another one will be out this weekend after I get to play with Dual-wan a bit more... here's the latest installer link:

Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R2/master/vpnmon-r2-2.01b7.sh" -o "/jffs/scripts/vpnmon-r2.sh" && chmod a+rx "/jffs/scripts/vpnmon-r2.sh"
 
Yea no problem,

Code:
WAN0TARGET=8.8.8.8
WAN1TARGET=1.1.1.1
PINGCOUNT=5
PINGTIMEOUT=1
WANDISABLEDSLEEPTIMER=60
BOOTDELAYTIMER=15
WAN0_QOS_IBW=512000
WAN1_QOS_IBW=512000
WAN0_QOS_OBW=512000
WAN1_QOS_OBW=512000
WAN0_QOS_OVERHEAD=0
WAN1_QOS_OVERHEAD=0
WAN0_QOS_ATM=0
WAN1_QOS_ATM=0
PACKETLOSSLOGGING=1
SENDEMAIL=1
SKIPEMAILSYSTEMUPTIME=180
EMAILTIMEOUT=30
OVPNSPLITTUNNEL=1
WAN0ROUTETABLE=100
WAN1ROUTETABLE=200
WAN0TARGETRULEPRIORITY=100
WAN1TARGETRULEPRIORITY=100
WAN0MARK=0x80000000
WAN1MARK=0x90000000
WAN0MASK=0xf0000000
WAN1MASK=0xf0000000
LBRULEPRIORITY=150
FROMWAN0PRIORITY=200
TOWAN0PRIORITY=400
FROMWAN1PRIORITY=200
TOWAN1PRIORITY=400
OVPNWAN0PRIORITY=100
OVPNWAN1PRIORITY=200

I would suggest you set WANDISABLEDSLEEPTIMER to a lower value if you need snappier switches and i don't have QOS or yazifi scripts enabled, so it's much simpler for me.

Ping count and ping timeout would dictate how fast your failovers occur, WAN Disabled is just how often the disabled loop checks for when it can come out of disabled state such as a WAN interface being disabled and then being re-enabled.
 
Yey! I'm really glad it's finally working!! :) Yeah, I know what you mean, but I'd rather leave it to the built-in functionality or the specialized scripts like @Ranger802004's, which can handle that function much more gracefully. Vpnmon will handle the VPN connection aspects, turning those on and off, but will take a backseat and just report on what it's seeing from the WAN side.

Would it be beneficial if my script restarted VPN service on Failover?
 
Would it be beneficial if my script restarted VPN service on Failover?
Well, the VPN connection is gonna die as soon as the WAN goes down... at that point, vpnmon-r2 will recognize it and try to re-establish it on the next working WAN connection. I think we should probably leave as-is?
 
Well, my dual-wan testing went surprisingly bad this morning. :( It's a 4G usb modem, and in fail-over mode, the router just kept saying "cold standby", even after the main WAN went down. I didn't see any way to force it, and it didn't automatically switch when it said it would. So then I tried load balancing... and it said that there was a DHCP issue from the ISP... it ended up changing my router's main LAN IP by itself, and still didn't work. Bah.... I'll give it another go in a bit.
 
Well, my dual-wan testing went surprisingly bad this morning. :( It's a 4G usb modem, and in fail-over mode, the router just kept saying "cold standby", even after the main WAN went down. I didn't see any way to force it, and it didn't automatically switch when it said it would. So then I tried load balancing... and it said that there was a DHCP issue from the ISP... it ended up changing my router's main LAN IP by itself, and still didn't work. Bah.... I'll give it another go in a bit.
Did you disable factory fail over ? , what is the monitor option saying ?
 
Well, my dual-wan testing went surprisingly bad this morning. :( It's a 4G usb modem, and in fail-over mode, the router just kept saying "cold standby", even after the main WAN went down. I didn't see any way to force it, and it didn't automatically switch when it said it would. So then I tried load balancing... and it said that there was a DHCP issue from the ISP... it ended up changing my router's main LAN IP by itself, and still didn't work. Bah.... I'll give it another go in a bit.

Turn on debug logging and collect logs if you are using my script.
 
Turn on debug logging and collect logs if you are using my script.
Was actually trying stock features first. They might be nonfunctional for me. Will try your script next!
 
Was actually trying stock features first. They might be nonfunctional for me. Will try your script next!
Yea the factory Failover is terrible, that’s why I wrote my script lol.
 
More of the same issue after wail failover @Viktor Jaep, Hope you had some luck figuring it out

1658038886389.png


logs : https://pastebin.com/aNYeRAfs


even reset doesn't work

1658039212602.png
 
ip rule list
jax@GT-AX11000-6A10:/tmp/home/root# ip rule list
0: from all lookup local
100: from all to 8.8.8.8 iif lo lookup wan0
100: from all to 1.1.1.1 iif lo lookup wan1
32766: from all lookup main
32767: from all lookup default
 

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