What's new

VPNMON VPNMON-R2 v2.0 -Jul 10, 2022- 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!

Glad it's working out good for you! Let me know how things look after a few resets, and make sure everything works as advertised for your YazFi clients! I'll check in with you over the weekend. ;)
Today my cable modem ran into an issue with DHCP that required a reboot of the modem. After I rebooted the modem, I also rebooted the router. My custom VPN Director rules disappeared. The only rules still there were the rules YazFi adds. This caused an endless loop with VPNMON thinking it was never connected to the VPN because of the Killswitch. Once I added my LAN rule back for all the VPNs and the rule to access the cable modem, everything started working again.
 
Today my cable modem ran into an issue with DHCP that required a reboot of the modem. After I rebooted the modem, I also rebooted the router. My custom VPN Director rules disappeared. The only rules still there were the rules YazFi adds. This caused an endless loop with VPNMON thinking it was never connected to the VPN because of the Killswitch. Once I added my LAN rule back for all the VPNs and the rule to access the cable modem, everything started working again.
That's definitely a tough one to try to prevent with a program... when things get broken to the point where connections aren't possible. I would think that when VPNMON tried to kill all VPN connections, it would have been successful in trying to establish another connection. But perhaps it couldn't reach out to the internet due to the modem/router still trying to recover? Interesting scenario, @iTyPsIDg!
 
Hey @iTyPsIDg and @SomeWhereOverTheRainBow ... just checking in to make sure you have been experiencing success with the integration of the YazFi guest network VPN slot update process? I'll plan on making it live today if everything looks/works good on your ends! Thanks again both of for your help and great suggestions. ;)
 
Happy to announce a new version with some added functionality that will greatly compliment those running YazFi or looking to support multiple NordVPN countries!

v1.4 - (May 01, 2022)
* The big news today is that VPNMON-R2 is now able to integrate with YazFi! Thanks to @iTyPsIDg for the great suggestion! Using the setup utility (-config switch), you can now specify which of the 3 x 2.4Ghz, 5Ghz and secondary 5Ghz guest networks you want to sync with VPNMON-R2 when it randomly picks a new VPN connection and updates the slot number directly in YazFi. This should make life a lot more bearable for those running multiple guest networks, and wanting to make use of the full power of randomized VPN connections! :)
* The other big news is that VPNMON-R2 can now also accept 2 additional NordVPN countries for a total of 3 supported countries to randomly connect to! Also configurable through the setup utility (-config switch), you can now specify which additional (up to) 2 countries you want to add. When VPNMON-R2 goes through it's reset function, it will randomly pick from one of the (up to) 3 countries, optionally whitelist all available NordVPN servers for that country in your Skynet firewall, and optionally make a SuperRandom(r) connection to one out of the many available servers in the specified country! Yes, we have gone international! Thanks goes to @Spud for the excellent suggestion!
* Some more code cleanup, optimizations and expanded on the config menu to handle the new YazFi and multiple country questions during setup.
 
Last edited:
@Viktor Jaep

Hmmm, minor hiccup, getting the following error and no joy trying to run it on my RT-AX86U after the update (have also tried re-downloading it from scratch).


Code:
admin@AsusRouter:/jffs/scripts# ./vpnmon-r2.sh -monitor
./vpnmon-r2.sh: line 454: syntax error: unexpected "fi" (expecting "then")

Anyone else?
 
@Viktor Jaep

Hmmm, minor hiccup, getting the following error and no joy trying to run it on my RT-AX86U after the update (have also tried re-downloading it from scratch).


Code:
admin@AsusRouter:/jffs/scripts# ./vpnmon-r2.sh -monitor
./vpnmon-r2.sh: line 454: syntax error: unexpected "fi" (expecting "then")

Anyone else?
Sorry Steve... How sloppy of me. ;( I should have a fix for you in a few hours. Should be a quick fix.
 
@Viktor Jaep

Hmmm, minor hiccup, getting the following error and no joy trying to run it on my RT-AX86U after the update (have also tried re-downloading it from scratch).


Code:
admin@AsusRouter:/jffs/scripts# ./vpnmon-r2.sh -monitor
./vpnmon-r2.sh: line 454: syntax error: unexpected "fi" (expecting "then")

Anyone else?
Well, @Stephen Harrington ... it seems to be fixed. Strangest thing I've ever seen. There wasn't anything wrong with the code, because I could copy it onto my router and run it just fine without error. But when I uploaded the .sh file to github, something seemed to keep getting corrupted with it, so that when you download it with curl, or just try to copy/paste it back over, it came over corrupt. Even though the code looked perfectly fine in nano, and matched up to what I'm seeing on my end. Anyways, I've tried it a couple of times, and curl seems to be working again. Please give it a shot.

I'll be adding the testing of the whole github update process on the next version release because I obviously can't trust this now. ;)

Any other devs out there... have you seen this? What's the best practice for copying code over to github? You would think uploading your .sh file would work fine. Guess not. :(
 
Last edited:
Well, @Stephen Harrington ... it seems to be fixed. Strangest thing I've ever seen. There wasn't anything wrong with the code, because I could copy it onto my router and run it just fine without error. But when I uploaded the .sh file to github, something seemed to keep getting corrupted with it, so that when you download it with curl, or just try to copy/paste it back over, it came over corrupt. Even though the code looked perfectly fine in nano, and matched up to what I'm seeing on my end. Anyways, I've tried it a couple of times, and curl seems to be working again. Please give it a shot.

Any other devs out there... have you seen this? What's the best practice for copying code over to github? You would think uploading your .sh file would work fine. Guess not. :(
https://www.shellcheck.net/
will usually catch any odd ball miss-hap that may occur in the copy process. I have noticed sometimes this happens with github. I usually create a separate branch from the main and do a final shell check before committing to the main.
 
https://www.shellcheck.net/
will usually catch any odd ball miss-hap that may occur in the copy process. I have noticed sometimes this happens with github. I usually create a separate branch from the main and do a final shell check before committing to the main.
Wow, I wish there was a way to weed out the overwhelming number of POSIX sh warnings! o_O Really appreciate the tip!!
 
Wow, I wish there was a way to weed out the overwhelming number of POSIX sh warnings! o_O Really appreciate the tip!!
If you know the line of code is good and are willing to ignore the posix warnings, you can place lines like these immediately following your shebang line,

Code:
# shellcheck disable=SC1001
# shellcheck disable=SC1083
# shellcheck disable=SC2010
# shellcheck disable=SC2015
# shellcheck disable=SC2016
# shellcheck disable=SC2034
# shellcheck disable=SC2124
# shellcheck disable=SC2155
# shellcheck disable=SC2181
# shellcheck disable=SC3043
# shellcheck disable=SC3045
# shellcheck disable=SC3057
# shellcheck disable=SC3060


the SC**** indicates the type of warning you want to ignore. If you need advice for making certain things more compliant, I can also help in this regard as well.
 
If you know the line of code is good and are willing to ignore the posix warnings, you can place lines like these immediately following your shebang line,

Code:
# shellcheck disable=SC1001
# shellcheck disable=SC1083
# shellcheck disable=SC2010
# shellcheck disable=SC2015
# shellcheck disable=SC2016
# shellcheck disable=SC2034
# shellcheck disable=SC2124
# shellcheck disable=SC2155
# shellcheck disable=SC2181
# shellcheck disable=SC3043
# shellcheck disable=SC3045
# shellcheck disable=SC3057
# shellcheck disable=SC3060


the SC**** indicates the type of warning you want to ignore. If you need advice for making certain things more compliant, I can also help in this regard as well.
AHHHH,,, I have seen this in other people's code before -- never knew what that was UNTIL NOW! Thanks for the excellent tip!! :)
 
@Viktor Jaep

The one good thing about shellcheck.net is that it points out where the actual breaks in code are too, whatever might be causing an issue, and/or incomplete lines of code.
It will definitely be in my toolbox for the next release. I'll start pouring through it and see if I can get it to help firm up some of my (low) coding standards. Lol
 
It will definitely be in my toolbox for the next release. I'll start pouring through it and see if I can get it to help firm up some of my (low) coding standards. Lol
I mean, I understand using to up to a point. In reality it is beneficial to make your code more up to the "standards" and less snapfu, but there may come a time you design part of the subshell to behave a certain way given the return values and shellcheck.net will be screaming at you about it, but your method is much simpler and easier to run.
 
i thoroughly recommend using an editor like Atom that has built-in Git support and extensions like Shellcheck and other code linters
I've been using Atom... but when I upload my code to Github, I actually just upload my local .sh file. Should I be doing it differently? I just got done running everything through Shellcheck. Wonderful little tool! :)
 
I've been using Atom... but when I upload my code to Github, I actually just upload my local .sh file. Should I be doing it differently? I just got done running everything through Shellcheck. Wonderful little tool! :)
Do you have Git installed? With Atom, Visual Studio, and many other editors, you can integrate Git commands to push your changes.
 
Similar threads
Thread starter Title Forum Replies Date
Ripshod (Not specifically) VPNMON-R3 1.11 failure domino effect Asuswrt-Merlin AddOns 20

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