What's new

VPNMON VPNMON-R3 v1.3.7 -Oct 20, 2024- Monitor WAN/Dual-WAN/OpenVPN 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!

Did anyone find the script super super laggy? Sometime it takes like one minute to enter the operation menu after I press "S".
I have no lag when making menu choices.
 
Thank you for bringing USB issue. I am using a really old generic flash drive on the router.

I thought about the flash drive for a while but decided not to replace it because I thought that the script runs from JFFS not the flash drive. But the ultimate reason is that I am too lazy and it looks to be a lot of work swapping the flash drive.

But I will try a new flash drive in the next week when I have some free time.
 
Thank you for bringing USB issue. I am using a really old generic flash drive on the router.

I thought about the flash drive for a while but decided not to replace it because I thought that the script runs from JFFS not the flash drive. But the ultimate reason is that I am too lazy and it looks to be a lot of work swapping the flash drive.

But I will try a new flash drive in the next week when I have some free time.
Replace that flash drive with an SSD/Enclosure... They're cheap. There's multiple posts out here on what to look for, like: https://www.snbforums.com/threads/usb-size.88209/post-882615

And you can use BACKUPMON to help with the transition. You basically take a backup of your current environment... replace your drive with the SSD, give it the same name/label, format thru AMTM/create your swapfile, and restore... Easy-peasy. ;)
 
Replace that flash drive with an SSD/Enclosure... They're cheap. There's multiple posts out here on what to look for, like: https://www.snbforums.com/threads/usb-size.88209/post-882615

And you can use BACKUPMON to help with the transition. You basically take a backup of your current environment... replace your drive with the SSD, give it the same name/label, format thru AMTM/create your swapfile, and restore... Easy-peasy. ;)
That may cause further problems if the drive contains damaged files. Personally I'd start fresh.
 
That may cause further problems if the drive contains damaged files. Personally I'd start fresh.
Worth a shot... and if it doesn't transition satisfactorily, start from scratch. ;)
 
NEW BETA: Pretty major update today, adding back in the WAN monitoring capabilities, and determining if VPNMON-R3 needs to kill connections and hang back in a loop until the WAN connectivity is restored again. Releasing this as a beta to ensure it works smoothly for everyone before a formal release... please give me feedback if it works for you one way or another... especially for those running dual-WAN, or other non-traditional means of WAN connectivity to ensure everything is detected and displayed correctly... would love to see your screenshots for those of you willing to share. Enjoy!

What's new?
v1.04b2
- 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: Few more log entries for various reset conditions were added.
- 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!

Beta Download Link (run at your own risk!):
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R3/main/vpnmon-r3-1.04b2.sh" -o "/jffs/scripts/vpnmon-r3.sh" && chmod 755 "/jffs/scripts/vpnmon-r3.sh"

Significant Screenshots:

New Config menu item #6 added to optionally add WAN monitoring (highly recommended)
1705171503373.png


Item #6 with more details:
1705171532680.png


As soon as the feature is enabled, it will test your WAN connection to determine if a VPN connection will be viable.
1705171251081.png


And here's the new interface showing stats about your WAN connection above your VPN stats...
1705171595977.png
 
Last edited:
"unknown operand" has crept in again.

Selection_003.png
 
"unknown operand" has crept in again.

View attachment 55491
Would you be so kind to please send me some debug output? Please uncomment these lines: 2649, 2650 and 3049... run it until you start seeing these unknown operands, and send it over?
 
Would you be so kind to please send me some debug output? Please uncomment these lines: 2649, 2650 and 3049... run it until you start seeing these unknown operands, and send it over?
Will do
 
Thank you... it just kills me that it works perfectly fine on my end without any of these unknown operands. Almost like some routers are more picky with how lenient they are at interpreting/running the code.
 
It ran that fast I never saw the error
 

Attachments

  • output.txt
    21.8 KB · Views: 14
@Ripshod ... I've made some assumptions on some variables that could have caused this issue, and made some fixes... please give b2 a shot:

Code:
url --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R3/main/vpnmon-r3-1.04b2.sh" -o "/jffs/scripts/vpnmon-r3.sh" && chmod 755 "/jffs/scripts/vpnmon-r3.sh"
 
@Ripshod ... I've made some assumptions on some variables that could have caused this issue, and made some fixes... please give b2 a shot:

Code:
url --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R3/main/vpnmon-r3-1.04b2.sh" -o "/jffs/scripts/vpnmon-r3.sh" && chmod 755 "/jffs/scripts/vpnmon-r3.sh"
That sorted it - much obliged.
 
NEW BETA: Pretty major update today, adding back in the WAN monitoring capabilities, and determining if VPNMON-R3 needs to kill connections and hang back in a loop until the WAN connectivity is restored again. Releasing this as a beta to ensure it works smoothly for everyone before a formal release... please give me feedback if it works for you one way or another... especially for those running dual-WAN, or other non-traditional means of WAN connectivity to ensure everything is detected and displayed correctly... would love to see your screenshots for those of you willing to share. Enjoy!

What's new?
v1.04b2
- 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: Few more log entries for various reset conditions were added.
- 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!

Beta Download Link (run at your own risk!):
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R3/main/vpnmon-r3-1.04b2.sh" -o "/jffs/scripts/vpnmon-r3.sh" && chmod 755 "/jffs/scripts/vpnmon-r3.sh"

Significant Screenshots:

New Config menu item #6 added to optionally add WAN monitoring (highly recommended)
View attachment 55487

Item #6 with more details:
View attachment 55488

As soon as the feature is enabled, it will test your WAN connection to determine if a VPN connection will be viable.
View attachment 55482

And here's the new interface showing stats about your WAN connection above your VPN stats...
View attachment 55489
104.b2 seems to be working more reliably for me. Previously in 103 I had occasions where VPN links would be reported as up in monitor but when logging into router one or more links was actually be down. I think 104.b1 fixed this issue.

Also even though I had setup the option to restart all tunnels at a certain time daily it didn't seem to happen as the link time didn't correspond with the number of hours it should show.

I use LAG between modem and AX86S. When I select monitor WAN connection VPMON correctly identifies I have a bond0 connection and WAN0 is active however shows WAN1 is inactive. Don't think it makes any difference but just telling you what I see.

Excellent utility and getting even better. Thank you.
 
104.b2 seems to be working more reliably for me. Previously in 103 I had occasions where VPN links would be reported as up in monitor but when logging into router one or more links was actually be down. I think 104.b1 fixed this issue.
Thanks for the feedback! Would the UI still show that the tunnel was up, and was still showing a ping/city, etc?

Also even though I had setup the option to restart all tunnels at a certain time daily it didn't seem to happen as the link time didn't correspond with the number of hours it should show.
Does the "VPN Reset CRON Time Scheduler" item under the operations menu correspond with the entry located in your SERVICES-START? Here's mine that kicks off at 01:00:
Code:
cru a RunVPNMONR3reset "00 1 * * * sh /jffs/scripts/vpnmon-r3.sh -reset"

If something looks off, try disabling the reset in VPNMON-R3, remove the offending entry in SERVICES-START, and try re-enabling the reset. See if that corrects it?

I use LAG between modem and AX86S. When I select monitor WAN connection VPMON correctly identifies I have a bond0 connection and WAN0 is active however shows WAN1 is inactive. Don't think it makes any difference but just telling you what I see.
So even with LAG, would you expect WAN1 to show something? Do you see anything under the Merlin FW UI that shows any interaction with WAN1? If so, I'd need to do some digging through NVRAM. Would you please be able to PM me a screenshot, and let me know what you would expect it to show on-screen?

Excellent utility and getting even better. Thank you.
Much appreciated! Thanks to feedback like yours, there's always more opportunities for improvements! :)
 
Thanks for the feedback! Would the UI still show that the tunnel was up, and was still showing a ping/city, etc?


Does the "VPN Reset CRON Time Scheduler" item under the operations menu correspond with the entry located in your SERVICES-START? Here's mine that kicks off at 01:00:
Code:
cru a RunVPNMONR3reset "00 1 * * * sh /jffs/scripts/vpnmon-r3.sh -reset"

If something looks off, try disabling the reset in VPNMON-R3, remove the offending entry in SERVICES-START, and try re-enabling the reset. See if that corrects it?


So even with LAG, would you expect WAN1 to show something? Do you see anything under the Merlin FW UI that shows any interaction with WAN1? If so, I'd need to do some digging through NVRAM. Would you please be able to PM me a screenshot, and let me know what you would expect it to show on-screen?


Much appreciated! Thanks to feedback like yours, there's always more opportunities for improvements! :)
When VPMON showed the link was up and I then checked in the GUI it showed the tunnel was down and no information was shown for the down tunnels on the VPN status page. Usually it was just one of the three tunnels I have setup and monitored. Also if I then went into spdMerlin and looked to see recent speedtests for the VPN tunnel there would be none. I then would restart the tunnel(s) either on the WiFI client page or by using scMerlin.

You are correct about the solution for the failed restart of VPN tunnels based on time of day. When I disabled that feature then renenabled it did get it working. Not sure if it was a problem in 1.03 or the 1.04s fixed this issue but for now seems to be working.

On the routers network map page it shows LAG activated at 2 Gbps and if you look at the WAN port and LAN port 4 which is the aggregation port they both show as active at 1 gig and finally on the VN-Stat page it reports the data for Bond1 so LAG is functioning. I only brought what I was seeing with LAG to your attention as probably not many people are using that feature so I might be the only report you get.

Everything seems to be working better for me first on 1.04b and then then 1.04b2.

I will let you know if I spot anything else. I probably will turn off the time of day restart if the monitor does its job and keeps the tunnels up reliably. I was only using that feature as a Plan B.

Thanks again.
 
You are correct about the solution for the failed restart of VPN tunnels based on time of day. When I disabled that feature then renenabled it did get it working. Not sure if it was a problem in 1.03 or the 1.04s fixed this issue but for now seems to be working.
OK cool... glad you got it working again!

On the routers network map page it shows LAG activated at 2 Gbps and if you look at the WAN port and LAN port 4 which is the aggregation port they both show as active at 1 gig and finally on the VN-Stat page it reports the data for Bond1 so LAG is functioning. I only brought what I was seeing with LAG to your attention as probably not many people are using that feature so I might be the only report you get.
Would love to see a screenshot of what you see on your network map page if you would be so kind. I've never seen a setup with LAG before. :) But yeah, I'm not even looking at any LAN ports, just the WAN statuses... I'd be curious to see what NVRAM values are being populated for these "bond0"/"bond1" connections? Would you be willing to share some of your output by running:

Code:
nvram show | grep "bond0"
nvram show | grep "bond1"

Everything seems to be working better for me first on 1.04b and then then 1.04b2.

I will let you know if I spot anything else. I probably will turn off the time of day restart if the monitor does its job and keeps the tunnels up reliably. I was only using that feature as a Plan B.

Thanks again.
Absolutely! Glad things are going well! Right now I've got 5 concurrent VPN connections going, 1 is for production, the other 4 are for testing, to keep putting VPNMON-R3 through its paces. Let me know if you notice anything else! :)
 

Similar threads

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