What's new

VPNMON VPNMON-R3 v1.3.3 -Apr 2, 2024- Monitor WAN/Dual-WAN/VPN Health & Reset Multiple OpenVPN Connections (Now available in AMTM!)

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

Releasing B4 into the wild... a lot of stability changes to handle some of the misbehaving VPN slot scenarios. Enjoy! Looking forward to your feedback!

What's new (since B2)?
v1.04b4 - (January 19, 2024)
- ADDED:
More checks while determining vpn health, and adding more logic around failed connections, including an indicator showing the number of attempts a certain vpn slot has undergone if it comes back failing the ping and curl tests.
- ADDED: Also, timing delays to allow for tunnels to connect, disconnect and settle have been extended. No, your router hasn't slowed down. I'm just making sure processes aren't stepping over each other to give you the most stable monitoring experience.
- ADDED: When a VPN connection fails, an intermediate 5 second counter will appear allowing you to (P)ause execution. This allows you to enter the Operations Menu, should you need to make any adjustments. I found that with successive failures, it was nearly impossible to get to the Operations menu in order to exclude a certain slot that was causing issues.
- FIXED: When the -reset switch is thrown, VPNMON-R3 will immediately drop to the waiting screen. Thanks to @salvo for noticing!

Download Link:
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R3/main/vpnmon-r3-1.04b4.sh" -o "/jffs/scripts/vpnmon-r3.sh" && chmod 755 "/jffs/scripts/vpnmon-r3.sh"

Significant Screenshots:

When a VPN slot misbehaves and no longer pings, it will now show the number of attempts before giving up to reset it
1705700040568.png


Directly before it resets a connection, a 5 second timer will allow you to "Pause" the process in order to get to the Operations Menu
1705700053874.png


The Operations menu (coming from an imminent reset) will basically allow you to change things up in case you need to make some tweaks to a bad IP, bad query, turn off monitoring for a troublesome slot, etc... and let's you un-pause so it goes back to doing its thing!
1705700107469.png
 
1.) Just a small bug, script considers 1.03 higher than 1.04 beta
Code:
Update Utility


  This utility allows you to check, download and install updates
 ---------------------------------------------------------------------------------------


Current Version: 1.04b4
Updated Version: 1.03


Score! There is a new version out there! Would you like to update?
[y/n]?

- FIXED: When the -reset switch is thrown, VPNMON-R3 will immediately drop to the waiting screen. Thanks to @salvo for noticing!
2.) Reset switch immediately switch to waiting screen, so far so good...in average in my cases takes around 2min 47sec to restart 3 VPN connections (with 5 recommended server list per VPN connection)

3.) Not sure if this is meant to be this way but WAN checking is disabled however script checks the WAN connectivity
Code:
(6) : Provide additional WAN/Dual WAN monitoring   : Disabled


1705704533622.png
 
1.03 stable is higher than 1.04B (beta).
 
1.) Just a small bug, script considers 1.03 higher than 1.04 beta
I could just disable the update menu while on a beta version, or, it would allow someone to downgrade back to stable. I'll just leave it be. ;)
2.) Reset switch immediately switch to waiting screen, so far so good...in average in my cases takes around 2min 47sec to restart 3 VPN connections (with 5 recommended server list per VPN connection)
I bumped up the amount of time between segments (stopping, starting, settling, etc.) so that processes don't walk over each other. I would love to shorten the time, but I've got more testing to do. I have some other ideas to determine if I can move quicker between steps. The main concern is making sure it's stable and reliable... not flaky and random.

3.) Not sure if this is meant to be this way but WAN checking is disabled however script checks the WAN connectivity
Code:
(6) : Provide additional WAN/Dual WAN monitoring   : Disabled
Good catch... I have it checking WAN in 2 different places... must have forgotten about checking for exceptions at one of them ;)
 
Quick WAN Check fix... Beta5 released!

What's new?
v1.04b5 - (January 19, 2024)
- FIXED:
WAN checks were still happening even when disabled. Thanks to @salvo! Fixed!

Download Link:
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R3/main/vpnmon-r3-1.04b5.sh" -o "/jffs/scripts/vpnmon-r3.sh" && chmod 755 "/jffs/scripts/vpnmon-r3.sh"
 
Lotsa tweaks, fixes and optimizations... and added a new feature in B6! Enjoy!

What's new?
v1.04b6 - (January 21, 2024)
- ADDED:
Under the Run Automations operations menu item, the ability to import your custom VPN Slot lists into Skynet is now a possibility! In the past, certain blocklists would also prevent you from connecting to certain VPN servers because they were actively being blocked. From this menu, pressing s1-s5 will import the contents directly to Skynet, giving you peace of mind that your VPN server endpoints are whitelisted.
- FIXED: The timing on connecting, stopping and settling have been dropped slightly. Also, shaved more time by not spending 10 seconds forcing a service_stop on a connection that has already stopped. Likewise, checking for VPN slots in an error (-1) state, and force stopping these, then forcing an NVRAM state reset on them to change them back to 0 (disconnected).

Download Link:
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R3/main/vpnmon-r3-1.04b6.sh" -o "/jffs/scripts/vpnmon-r3.sh" && chmod 755 "/jffs/scripts/vpnmon-r3.sh"

Significant Screenshots:

Showing the s1-s5 options to allow you to import your custom lists into Skynet for whitelisting purposes
1705885502968.png
 
Last edited:
Thank you for all your feedback to those who have been testing the new VPNMON-R3 version these last few weeks! The newest version is out -- below is a huge slew of fixes and changes to be found in v1.10 (with rolled up changelogs from the previous betas)! With this version, I am also sadly announcing the sunset of VPNMON-R2. Changes have been made to R3 to provide an uninstallation process of R2 if it's still present on your router.

What's new!?
VPNMON-R3 v1.10 - (January 23, 2024)
- MAJOR:
VPNMON-R2 sunset notification banner is added if found that R2 is still installed. I have made the difficult decision to sunset VPNMON-R2, and drive adoption of R3 so that I may focus on developing it further. When pressing the (X) key, users will be driven to an R2 uninstall menu, allowing you to uninstall all R2 files and components directly from R3. Similarly, in R2, an update banner will be prominently displayed at all times, driving people to the update menu, to upgrade to R3 directly from within R2. In the near future, new installs of R2 will no longer be possible, and will be driven to install R3.
- MAJOR: In one of the recent storms that brough down my WAN connection, I quickly found out that VPNMON-R3 does not like that, and caused the script to hang for some unknown reason. Thinking it might be a good idea to break out the WAN monitoring functionality from R2, this has now been incorporated as a selectable option. When enabled, VPNMON-R3 will test the WAN on each cycle, and if determined that the WAN is down, will kill your VPN connections, and fall back into a graceful loop where it periodically tests the WAN connection in order to start the VPN connection(s) back up. As with R2, this will look at both WAN0 and WAN1, and should be able to correctly display the necessary information for those running those fancy Dual-WAN configurations. This has been tested on a single WAN0 connection where I completely powered off the modem, simulating a WAN outage, and bringing back up to ensure R3 was able to recover correctly.
- ADDED: Under the Run Automations operations menu item, the ability to import your custom VPN Slot lists into Skynet is now a possibility! In the past, certain blocklists would also prevent you from connecting to certain VPN servers because they were actively being blocked. From this menu, pressing s1-s5 will import the contents directly to Skynet, giving you peace of mind that your VPN server endpoints are whitelisted.
- ADDED: More checks while determining vpn health, and adding more logic around failed connections, including an indicator showing the number of attempts a certain vpn slot has undergone if it comes back failing the ping and curl tests.
- ADDED: Also, timing delays to allow for tunnels to connect, disconnect and settle have been extended. No, your router hasn't slowed down. I'm just making sure processes aren't stepping over each other to give you the most stable monitoring experience.
- ADDED: When a VPN connection fails, an intermediate 5 second counter will appear allowing you to (P)ause execution. This allows you to enter the Operations Menu, should you need to make any adjustments. I found that with successive failures, it was nearly impossible to get to the Operations menu in order to exclude a certain slot that was causing issues.
- ADDED: Few more log entries for various reset conditions were added.
- FIXED: The timing on connecting, stopping and settling have been dropped slightly. Also, shaved more time by not spending 10 seconds forcing a service_stop on a connection that has already stopped. Likewise, checking for VPN slots in an error (-1) state, and force stopping these, then forcing an NVRAM state reset on them to change them back to 0 (disconnected).
- FIXED: WAN checks were still happening even when disabled. Thanks to @salvo! Fixed!
- FIXED: When the -reset switch is thrown, VPNMON-R3 will immediately drop to the waiting screen. Thanks to @salvo for noticing!
- FIXED: Minor corrections to wording or other on-screen layouts to make the UI more pleasing to the eye.
- FIXED: Made some revisions to how variables were used in order to cut down on some Unknown Operand errors that were initially captured by @Ripshod. Thank you!

Download link:
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R3/main/vpnmon-r3-1.10.sh" -o "/jffs/scripts/vpnmon-r3.sh" && chmod 755 "/jffs/scripts/vpnmon-r3.sh"

Significant Screenshots:
1706066780245.png
 
Excellent work @Viktor Jaep :)
Upgraded from the beta and all seems to be running smoothly!

A couple of queries/requests:
- Any chance you could add titanspeed from R2 to R3? 😉
- I noticed when I go into some menu options R3 doesn't 'remember' the display setting for the operations menu.
To elaborate more on the second one, at the main menu I typically show the operations menu. If I then issue the V or M commands and return to the main screen, the operations menu is displayed/remembered. If, however I issue a reset via 1, 2, 3 etc. when I return to the main menu, the operations menu is hidden.
 
Thank you for all your feedback to those who have been testing the new VPNMON-R3 version these last few weeks! The newest version is out -- below is a huge slew of fixes and changes to be found in v1.10 (with rolled up changelogs from the previous betas)! With this version, I am also sadly announcing the sunset of VPNMON-R2. Changes have been made to R3 to provide an uninstallation process of R2 if it's still present on your router.

What's new!?
VPNMON-R3 v1.10 - (January 23, 2024)
- MAJOR:
VPNMON-R2 sunset notification banner is added if found that R2 is still installed. I have made the difficult decision to sunset VPNMON-R2, and drive adoption of R3 so that I may focus on developing it further. When pressing the (X) key, users will be driven to an R2 uninstall menu, allowing you to uninstall all R2 files and components directly from R3. Similarly, in R2, an update banner will be prominently displayed at all times, driving people to the update menu, to upgrade to R3 directly from within R2. In the near future, new installs of R2 will no longer be possible, and will be driven to install R3.
- MAJOR: In one of the recent storms that brough down my WAN connection, I quickly found out that VPNMON-R3 does not like that, and caused the script to hang for some unknown reason. Thinking it might be a good idea to break out the WAN monitoring functionality from R2, this has now been incorporated as a selectable option. When enabled, VPNMON-R3 will test the WAN on each cycle, and if determined that the WAN is down, will kill your VPN connections, and fall back into a graceful loop where it periodically tests the WAN connection in order to start the VPN connection(s) back up. As with R2, this will look at both WAN0 and WAN1, and should be able to correctly display the necessary information for those running those fancy Dual-WAN configurations. This has been tested on a single WAN0 connection where I completely powered off the modem, simulating a WAN outage, and bringing back up to ensure R3 was able to recover correctly.
- ADDED: Under the Run Automations operations menu item, the ability to import your custom VPN Slot lists into Skynet is now a possibility! In the past, certain blocklists would also prevent you from connecting to certain VPN servers because they were actively being blocked. From this menu, pressing s1-s5 will import the contents directly to Skynet, giving you peace of mind that your VPN server endpoints are whitelisted.
- ADDED: More checks while determining vpn health, and adding more logic around failed connections, including an indicator showing the number of attempts a certain vpn slot has undergone if it comes back failing the ping and curl tests.
- ADDED: Also, timing delays to allow for tunnels to connect, disconnect and settle have been extended. No, your router hasn't slowed down. I'm just making sure processes aren't stepping over each other to give you the most stable monitoring experience.
- ADDED: When a VPN connection fails, an intermediate 5 second counter will appear allowing you to (P)ause execution. This allows you to enter the Operations Menu, should you need to make any adjustments. I found that with successive failures, it was nearly impossible to get to the Operations menu in order to exclude a certain slot that was causing issues.
- ADDED: Few more log entries for various reset conditions were added.
- FIXED: The timing on connecting, stopping and settling have been dropped slightly. Also, shaved more time by not spending 10 seconds forcing a service_stop on a connection that has already stopped. Likewise, checking for VPN slots in an error (-1) state, and force stopping these, then forcing an NVRAM state reset on them to change them back to 0 (disconnected).
- FIXED: WAN checks were still happening even when disabled. Thanks to @salvo! Fixed!
- FIXED: When the -reset switch is thrown, VPNMON-R3 will immediately drop to the waiting screen. Thanks to @salvo for noticing!
- FIXED: Minor corrections to wording or other on-screen layouts to make the UI more pleasing to the eye.
- FIXED: Made some revisions to how variables were used in order to cut down on some Unknown Operand errors that were initially captured by @Ripshod. Thank you!

Download link:
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R3/main/vpnmon-r3-1.10.sh" -o "/jffs/scripts/vpnmon-r3.sh" && chmod 755 "/jffs/scripts/vpnmon-r3.sh"

Significant Screenshots:
View attachment 55902
Wow! You been busy 😮
 
Thank you for all your feedback to those who have been testing the new VPNMON-R3 version these last few weeks! The newest version is out -- below is a huge slew of fixes and changes to be found in v1.10 (with rolled up changelogs from the previous betas)! With this version, I am also sadly announcing the sunset of VPNMON-R2. Changes have been made to R3 to provide an uninstallation process of R2 if it's still present on your router.

What's new!?
VPNMON-R3 v1.10 - (January 23, 2024)
- MAJOR:
VPNMON-R2 sunset notification banner is added if found that R2 is still installed. I have made the difficult decision to sunset VPNMON-R2, and drive adoption of R3 so that I may focus on developing it further. When pressing the (X) key, users will be driven to an R2 uninstall menu, allowing you to uninstall all R2 files and components directly from R3. Similarly, in R2, an update banner will be prominently displayed at all times, driving people to the update menu, to upgrade to R3 directly from within R2. In the near future, new installs of R2 will no longer be possible, and will be driven to install R3.
- MAJOR: In one of the recent storms that brough down my WAN connection, I quickly found out that VPNMON-R3 does not like that, and caused the script to hang for some unknown reason. Thinking it might be a good idea to break out the WAN monitoring functionality from R2, this has now been incorporated as a selectable option. When enabled, VPNMON-R3 will test the WAN on each cycle, and if determined that the WAN is down, will kill your VPN connections, and fall back into a graceful loop where it periodically tests the WAN connection in order to start the VPN connection(s) back up. As with R2, this will look at both WAN0 and WAN1, and should be able to correctly display the necessary information for those running those fancy Dual-WAN configurations. This has been tested on a single WAN0 connection where I completely powered off the modem, simulating a WAN outage, and bringing back up to ensure R3 was able to recover correctly.
- ADDED: Under the Run Automations operations menu item, the ability to import your custom VPN Slot lists into Skynet is now a possibility! In the past, certain blocklists would also prevent you from connecting to certain VPN servers because they were actively being blocked. From this menu, pressing s1-s5 will import the contents directly to Skynet, giving you peace of mind that your VPN server endpoints are whitelisted.
- ADDED: More checks while determining vpn health, and adding more logic around failed connections, including an indicator showing the number of attempts a certain vpn slot has undergone if it comes back failing the ping and curl tests.
- ADDED: Also, timing delays to allow for tunnels to connect, disconnect and settle have been extended. No, your router hasn't slowed down. I'm just making sure processes aren't stepping over each other to give you the most stable monitoring experience.
- ADDED: When a VPN connection fails, an intermediate 5 second counter will appear allowing you to (P)ause execution. This allows you to enter the Operations Menu, should you need to make any adjustments. I found that with successive failures, it was nearly impossible to get to the Operations menu in order to exclude a certain slot that was causing issues.
- ADDED: Few more log entries for various reset conditions were added.
- FIXED: The timing on connecting, stopping and settling have been dropped slightly. Also, shaved more time by not spending 10 seconds forcing a service_stop on a connection that has already stopped. Likewise, checking for VPN slots in an error (-1) state, and force stopping these, then forcing an NVRAM state reset on them to change them back to 0 (disconnected).
- FIXED: WAN checks were still happening even when disabled. Thanks to @salvo! Fixed!
- FIXED: When the -reset switch is thrown, VPNMON-R3 will immediately drop to the waiting screen. Thanks to @salvo for noticing!
- FIXED: Minor corrections to wording or other on-screen layouts to make the UI more pleasing to the eye.
- FIXED: Made some revisions to how variables were used in order to cut down on some Unknown Operand errors that were initially captured by @Ripshod. Thank you!

Download link:
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R3/main/vpnmon-r3-1.10.sh" -o "/jffs/scripts/vpnmon-r3.sh" && chmod 755 "/jffs/scripts/vpnmon-r3.sh"

Significant Screenshots:
View attachment 55902
Have gone through all the betas and currently running b6. It has kept my three tunnels up and I have eliminated the daily restart. Can see that it is working as now I show variable up times on each tunnel.

Only thing that is a little strange is the uptime on the tunnels exceeds the uptime on the router. I updated to 388.6 three days ago but VPN tunnels show uptime 4, 5 & 6 days. Not an important issue but as I said strange.

Thanks for the great work.
 
Have gone through all the betas and currently running b6. It has kept my three tunnels up and I have eliminated the daily restart. Can see that it is working as now I show variable up times on each tunnel.

Only thing that is a little strange is the uptime on the tunnels exceeds the uptime on the router. I updated to 388.6 three days ago but VPN tunnels show uptime 4, 5 & 6 days. Not an important issue but as I said strange.

Thanks for the great work.
Thanks for the feedback, @CaptainSTX ... that is very strange. Each time a VPN connection drops and reconnects... or if your router reboots, it should reset the time because the VPN connection would need to be started. Hmmm... Do you have your VPN clients auto start on reboot by chance? Perhaps they are starting before R3 has a chance to even start them? So it assumes they were all still running? I guess you can test it by hitting 1/2/3 etc... and seeing if it resets the time for you?

1706149000208.png
 
Excellent work @Viktor Jaep :)
Upgraded from the beta and all seems to be running smoothly!
Thanks! :)

A couple of queries/requests:
- Any chance you could add titanspeed from R2 to R3? 😉
I'll see what I can do!

- I noticed when I go into some menu options R3 doesn't 'remember' the display setting for the operations menu.
To elaborate more on the second one, at the main menu I typically show the operations menu. If I then issue the V or M commands and return to the main screen, the operations menu is displayed/remembered. If, however I issue a reset via 1, 2, 3 etc. when I return to the main menu, the operations menu is hidden.
The operations menu is not meant to be a static menu that stays up at all times... When you reset a VPN connection, it actually reloads the script from scratch, so it forgets what was done previously. I'll revisit this and see if a compete reload is truly needed, so standby. ;)
 
Thanks for the feedback, @CaptainSTX ... that is very strange. Each time a VPN connection drops and reconnects... or if your router reboots, it should reset the time because the VPN connection would need to be started. Hmmm... Do you have your VPN clients auto start on reboot by chance? Perhaps they are starting before R3 has a chance to even start them? So it assumes they were all still running? I guess you can test it by hitting 1/2/3 etc... and seeing if it resets the time for you?

View attachment 55937
Yes I have auto start on reboot selected. I will play around with the clients and see if I can create a situation where router uptime is the same as VPN tunnel uptime. I will turn the automatic restart off for my least used tunnel and then reboot the router and let you know what happens.

I am very satisfied with the way the app works and keeps the tunnels up so while the discrepancy is interesting it doesn't effect its utility.
 
Yes I have auto start on reboot selected. I will play around with the clients and see if I can create a situation where router uptime is the same as VPN tunnel uptime. I will turn the automatic restart off for my least used tunnel and then reboot the router and let you know what happens.
That makes sense for the tunnel uptimes now... ;)
I am very satisfied with the way the app works and keeps the tunnels up so while the discrepancy is interesting it doesn't effect its utility.
Yeah, it doesn't hurt. It's just more for interesting stats purposes... but I'm glad it's performing well for you!
 
That makes sense for the tunnel uptimes now... ;)

Yeah, it doesn't hurt. It's just more for interesting stats purposes... but I'm glad it's performing well for you!
I tested by disabling automatic restart and if that setting is disabled then the VPN tunnel uptime resets to Zero. I experimented with client 5 Stockholm.
 

Attachments

  • beforereboot.txt
    2.9 KB · Views: 4
I tested by disabling automatic restart and if that setting is disabled then the VPN tunnel uptime resets to Zero. I experimented with client 5 Stockholm.
Working as advertised. ;)
 
Small fixes in preparation for AMTM and a new command line switch for bypassing the Screen verbiage... enjoy!

What's new?
v1.11 - (January 27, 2024)
- ADDED:
New commandline switch "-now" to be used in conjunction with "-screen" that will allow you to bypass the screen timer and instructions, and will launch VPNMON-R3 directly into the screen environment without having to wait. (Usage example: vpnmon-r3 -screen -now) Thanks @TITAN for the request.
- FIXED: Changed a few legacy items so it conforms with AMTM standards. ;)

Download Link (update directly within VPNMON-R2 -> (C)onfigure/Setup -> (3) Check for latest updates):
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R3/main/vpnmon-r3-1.11.sh" -o "/jffs/scripts/vpnmon-r3.sh" && chmod 755 "/jffs/scripts/vpnmon-r3.sh"
 
Working as advertised. ;)
I think I will leave the setting in place to automatically restart a client on reboot as it is just a second level of backup. Thanks again.
 

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