What's new

VPNMON [BETA] VPNMON-R2 BETA is currently OPEN... New: AirVPN has been added! Remote Reset/Reboot! Auto-Start on Reboot!

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

Viktor Jaep

Very Senior Member
VPNMON-R2 v2.45b4
Mar 24, 2023


Calling all beta testers! As more features get added, the script keeps getting more complex, but better by the day thanks to your excellent suggestions and feedback! Some new functionality has been added, and wanted to throw this out to the community for any other feedback before I complete this release after things look solid. Thanks to @machinist for the suggestion! :)

What's new?:
v2.45b3 - (Revisions as of Mar 23, 2023)
- MAJOR:
We added another major VPN Provider -- AirVPN -- to the mix of compatible VPN services that play well with APIs, giving us the ability to use these for SuperRandom(r) functionality in the country (or countries) of your choice. Also, provides us with the ability to use the AirVPN Recommended Servers feature, for those who want their servers to stay closer or more optimized for speed. AirVPN gives us the same range of capabilities that NordVPN gives, including reporting on the current server Load, or resetting the connection if the load exceeds your specified amount... Also, the ability to whitelist your AirVPN servers in Skynet so they don't get blocked (as they so frequently do).... so, really happy to get this one added. Note: This assumes you have all (up to) 5 VPN slots configured and working with AirVPN config, using OpenVPN, TLS authentication & encryption - which is pretty much the standard out there.
- MAJOR: Added the capability to reset your VPN connection or reboot your router using an external file! I find myself in a pickle at times, unable to access my devices on a subnet, and unable to control my router from remote due to a misconfiguration or because the VPN tunnel got borked up, preventing all our devices from getting out to the internet. I wanted to (selfishly) find a way to externally cause the router to reset its VPN connection, and in a worst-case scenario, reboot the router! Well, that is all now possible. Simply host a file off an internet accessible server, having one of the words "RESET", "REBOOT" or "NORMAL" on the first line of the file. With options on the 2nd page in the config, you can specify if you want to enable this feature, what the full URL path to this file is (example: https://raw.githubusercontent.com/ViktorJp/VPNMON-R2/main/event.txt), and what kind of interval you want to use to check on this file. The next time VPNMON-R2 checks the file, it will act on one of these commands! I've added an indicator to the top of the UI if this feature is enabled, showing the interval seconds as well.
-MAJOR: Added the capability for VPNMON-R2 to auto-start after a reboot. By popular demand, I'm not sure how many times this was asked, so it's finally in there! Config menu item #16 will ask if you want VPNMON-R2 to auto-start. It inserts the command 'vpnmon-r2.sh -screen' into your /jffs/scripts/post-mount file. An indicator at the top of the UI shows if this feature is enabled, and intact in your post-mount file. If for some reason it's different than what was originally added, it will indicate that there's an issue.
- ADDED: A second page of config options! Currently with 14 options, the list is getting too large, and expanded it out onto a second page for future growth!
- FIXED: Made some modifications to the NordVPN API calls in order to hopefully provide a faster response for those dealing with bandwidth or other possible throttling limitations in other countries, like Turkey. Thanks to @iTyPsIDg for helping troubleshoot while out there!
- FIXED: Minor code improvements and optimizations.

Beta Download:
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R2/master/vpnmon-r2-2.45b4.sh" -o "/jffs/scripts/vpnmon-r2.sh" && chmod 755 "/jffs/scripts/vpnmon-r2.sh"

Stable Release:
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R2/master/vpnmon-r2-2.41.sh" -o "/jffs/scripts/vpnmon-r2.sh" && chmod 755 "/jffs/scripts/vpnmon-r2.sh"

Significant Screenshots:
1677422098724.png


1677422160569.png


Second page of config options:

vpnmon-r2-245b3-configpg2.png


External file VPN Reset (Reboot looks almost identical):
vpnmon-r2-245b3-extreset.png


If there are issues reading your external file, or one of the commands you specified on line 1 isn't right, VPNMON-R2 will tell you:
vpnmon-r2-245b3-fileinvalid.png
 
Last edited:

SomeWhereOverTheRainBow

Part of the Furniture
I thought I'd put this into its own thread for visibility reasons... Calling all WeVPN beta testers! VPNMON-R2 v2.20b1 officially supports WeVPN, including SuperRandom(r) and Multi-Country SuperRandom(r)!! :) I'm looking to see if one of you might be able to please give this a whirl, make sure it behaves OK with WeVPN client slots, is populating your slots with the right info, randomly making a new connection when dropped/reset, and that the SuperRandom functionality works. If you wouldn't mind posting or PM'ing me a screenshot to make sure everything looks right on your end in the UI? Thank you!! That saves me having to spend $$$ on a WeVPN subscription, but I will if necessary. Lol

1660877666719.png



Please note: WeVPN does not provide server loads (yet), and will incorporate that when it becomes available. Also, they don't provide straight IP addresses for their VPN hosts, which makes it more difficult to make it compatible with Skynet, so these two options are grayed out.

Beta Download:
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R2/master/vpnmon-r2-2.20b1.sh" -o "/jffs/scripts/vpnmon-r2.sh" && chmod a+rx "/jffs/scripts/vpnmon-r2.sh"

Stable Release:
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R2/master/vpnmon-r2-2.15sh" -o "/jffs/scripts/vpnmon-r2.sh" && chmod a+rx "/jffs/scripts/vpnmon-r2.sh"
I am getting there. Let you know soon how it is! ;)
 

Don->

Regular Contributor
I thought I'd put this into its own thread for visibility reasons... Calling all WeVPN beta testers! VPNMON-R2 v2.20b1 officially supports WeVPN, including SuperRandom(r) and Multi-Country SuperRandom(r)!! :) I'm looking to see if one of you might be able to please give this a whirl, make sure it behaves OK with WeVPN client slots, is populating your slots with the right info, randomly making a new connection when dropped/reset, and that the SuperRandom functionality works. If you wouldn't mind posting or PM'ing me a screenshot to make sure everything looks right on your end in the UI? Thank you!! That saves me having to spend $$$ on a WeVPN subscription, but I will if necessary. Lol

1660877666719.png



Please note: WeVPN does not provide server loads (yet), and will incorporate that when it becomes available. Also, they don't provide straight IP addresses for their VPN hosts, which makes it more difficult to make it compatible with Skynet, so these two options are grayed out.

Beta Download:
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R2/master/vpnmon-r2-2.20b1.sh" -o "/jffs/scripts/vpnmon-r2.sh" && chmod a+rx "/jffs/scripts/vpnmon-r2.sh"

Stable Release:
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R2/master/vpnmon-r2-2.15sh" -o "/jffs/scripts/vpnmon-r2.sh" && chmod a+rx "/jffs/scripts/vpnmon-r2.sh"
There is a typo in the stable release i think it should be ........../vpnmon-r2-2.15.sh" - a missing "."
 

Viktor Jaep

Very Senior Member
There is a typo in the stable release i think it should be ........../vpnmon-r2-2.15.sh" - a missing "."
Nice find! ;) Fixed!
 

IKNOWNOTHING

New Around Here
Viktor Jaep,

Excellent work on vpnmon-r2. I really love the script and it is perfect for recovering from dropped VPN connections. I would suggest a minor change in your next version. I used to run several vpn's simultaniously each in another country, but vpnmon-r2 resets all vpn's that startup on boot. Would it be possible to only reset the vpn's that were entered as available vpn slots while configuration vpnmon-r2?

thanks in advance
 

Viktor Jaep

Very Senior Member
Viktor Jaep,

Excellent work on vpnmon-r2. I really love the script and it is perfect for recovering from dropped VPN connections. I would suggest a minor change in your next version. I used to run several vpn's simultaniously each in another country, but vpnmon-r2 resets all vpn's that startup on boot. Would it be possible to only reset the vpn's that were entered as available vpn slots while configuration vpnmon-r2?

thanks in advance
Thanks @IKNOWNOTHING, that is a really great request! I didn't even think of that until you just mentioned this, because yes, it does kill all 5 client slots no matter how many you actually have configured. I'll get that in before the next release. ;)
 

Viktor Jaep

Very Senior Member
@Viktor Jaep Wow, what a great and friendly response! Thank you very much. I will be looking out for it :D
Hey @IKNOWNOTHING ... I've thrown Beta 2 out there that takes care of your issue with only killing the configured number of VPN slots now. Please let me know how it works out for you, OK?

Beta Download:
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R2/master/vpnmon-r2-2.20b2.sh" -o "/jffs/scripts/vpnmon-r2.sh" && chmod a+rx "/jffs/scripts/vpnmon-r2.sh"
 

Viktor Jaep

Very Senior Member
New BETA is available... enjoy! :)

See the [OP]!
 

kuki68ster

Occasional Visitor
Hello,

After installing the beta i got the following error, when trying to access amtm:

ASUSWRT-Merlin RT-AX86U 386.7_2 Sun Jul 24 21:37:08 UTC 2022
Asus@RT-AX86U-B968:/tmp/home/root# amtm
/usr/sbin/amtm: /jffs/addons/amtm/availUpd.txt: line 10: syntax error: unterminated quoted string
Asus@RT-AX86U-B968:/tmp/home/root#

The router is working as it should, apart from the error...

Apart from reinstalling from scratch amtm, what can i do?

Thanks for the help
 

Attachments

  • Captura de ecrã 2022-09-27, às 20.58.24.png
    Captura de ecrã 2022-09-27, às 20.58.24.png
    75.8 KB · Views: 43

Viktor Jaep

Very Senior Member
Hello,

After installing the beta i got the following error, when trying to access amtm:

ASUSWRT-Merlin RT-AX86U 386.7_2 Sun Jul 24 21:37:08 UTC 2022
Asus@RT-AX86U-B968:/tmp/home/root# amtm
/usr/sbin/amtm: /jffs/addons/amtm/availUpd.txt: line 10: syntax error: unterminated quoted string
Asus@RT-AX86U-B968:/tmp/home/root#

The router is working as it should, apart from the error...

Apart from reinstalling from scratch amtm, what can i do?

Thanks for the help

This is what mine currently comes back with... what does your availUpd.txt look like?

Code:
vpnmonUpate="<- v2.22"
vpnmonMD5="d6eca2e4d7c8d1b320b1c0c8e9b34c96"
 

Viktor Jaep

Very Senior Member
The next daily beta - v2.24b5 is now available... this is what's new:

- CHANGED: Revamped the reset conditions screens, which now display on a cleared page, instead of appending the reset output to the main UI.
- FIXED: I "may" have repaired the elusive unbound operand error that would occasionally appear on the main UI. FYI: @monakh!

See the [OP] for the download link!
 

Viktor Jaep

Very Senior Member
The next daily beta - v2.24b6 is now available - here's what's new:

- CHANGED: Joined the reset condition checks together into their own function in order to allow the (R)eset command to work instantaneously, instead of waiting for a cycle to finish.

See the [OP] for the download link!
 

monakh

Regular Contributor
Alright, here's an update from me on B3 / AXE16000.

As you know, I have been trying really hard to capture the "WAN down" issue via the troubleshooting script, but running it at the same time as B3 effectively resulted in random reboots within minutes of running the two together. In any event, I have given up on trying to discern exactly what "State: 2" means because it NEVER changes, at least not during the failures I have been experiencing.

So, today, I updated to B6 and have left out the troubleshooting script, let's see if the router stays stable. I think this AXE16000 hardware is just too new. It will take time to sort out all the various different kinks. You're ahead of the curve, though, methinks.

As an aside, it's very odd that the script only pulls recommended servers from a single city only. In my case, it is NY (used to be Tel Aviv, if you recall from a couple of days back). Is there a way to check if it's just me/my location or something else at play? When I go to the Nord recommended server site via the web browser, I get a different city every time.

Edit: Here's the log--on second thought, I don't think it's the troubleshooting script, could be AMTM:

A couple of days back:
Sep 27 23:07:37 kernel: Hardware name: GTAXE16000_2GB (DT)
Sep 27 23:07:37 kernel: pstate: 200f0010 (nzCv q A32 LE aif)
Sep 27 23:07:37 kernel: pc : 00000000f7c1c9d8
Sep 27 23:07:37 kernel: lr : 0000000080808080
Sep 27 23:07:37 kernel: sp : 00000000ffd0f920
Sep 27 23:07:37 kernel: x12: 0000000000000000
Sep 27 23:07:37 kernel: x11: 0000000000000000 x10: 000000000007e66c
Sep 27 23:07:37 kernel: x9 : 00000000f6afd008 x8 : 00000000000a387e
Sep 27 23:07:37 kernel: x7 : 0000000000000010 x6 : 0000000000000000
Sep 27 23:07:37 kernel: x5 : 00000000000a3884 x4 : 00000000fefefeff
Sep 27 23:07:37 kernel: x3 : 0000000000000000 x2 : 0000000000000000
Sep 27 23:07:37 kernel: x1 : 0000000000000107 x0 : 0000000000000000
Sep 27 23:13:46 kernel: Ax:4x:Bx:Bx:7x:2x not mesh client, can't delete it
May 5 08:05:21 syslogd started: BusyBox v1.25.1
May 5 08:05:21 crashlog: ^A
May 5 08:05:21 crashlog: <4>INFO MerlinSupport::merlin16_serdes_init(): END Merlin Initialization procedure
May 5 08:05:21 crashlog: <4>MerlinSupport::merline_speed_set_core(): Step 7 Config Speed to 2
May 5 08:05:21 crashlog: <4>--- Step 8 PLL/PMD setup configuration for speed 0, mode 13.

Just now:
Sep 29 21:02:07 kernel: Ax:4x:Bx:Bx:8x:9x not mesh client, can't delete it
May 5 08:05:21 syslogd started: BusyBox v1.25.1
May 5 08:05:21 kernel: klogd started: BusyBox v1.25.1 (2022-08-13 16:53:39 EDT)
May 5 08:05:21 kernel: Booting Linux on physical CPU 0x0000000000 [0x420f1000]
May 5 08:05:21 kernel: Linux version 4.19.183 (merlin@ubuntu-dev) (gcc version 9.2.0 (Buildroot 2019.11.1)) #1 SMP PREEMPT Sat Aug 13 16:53:54 EDT 2022
May 5 08:05:21 kernel: Machine model: GTAXE16000_2GB

I am getting this "not mesh client" quite a bit but it's only when I run either AMTM or VPNMON that the router reboots after that error (my money is on AMTM at the moment). No clue what that means!
 
Last edited:

Viktor Jaep

Very Senior Member
As you know, I have been trying really hard to capture the "WAN down" issue via the troubleshooting script, but running it at the same time as B3 effectively resulted in random reboots within minutes of running the two together. In any event, I have given up on trying to discern exactly what "State: 2" means because it NEVER changes, at least not during the failures I have been experiencing.
I really appreciate the report, @monakh! Have you been able to look at the log it generates under /jffs/scripts/wan0mon.log? That would be the smoking gun, if there are instances where it flips to a different state than 2 that would somehow cause vpnmon-r2 to fall into that weird loop? State:2 means "connected", which is the normal state it should be in.

Random reboots would be a MAJOR concern. A simple script like this should not be causing reboots. I would definitely look into this further! Or even post some event logs into the main thread for RMerlin or others to dissect?

So, today, I updated to B6 and have left out the troubleshooting script, let's see if the router stays stable. I think this AXE16000 hardware is just too new. It will take time to sort out all the various different kinks. You're ahead of the curve, though, methinks.
The hardware may be new, but the Merlin firmware running on there is new as well. Definitely some opportunities to see if we can find any behaviors or bugs that we can report to RMerlin. ;)

As an aside, it's very odd that the script only pulls recommended servers from a single city only. In my case, it is NY (used to be Tel Aviv, if you recall from a couple of days back). Is there a way to check if it's just me/my location or something else at play? When I go to the Nord recommended server site via the web browser, I get a different city every time.
The way I understand it, these would be the fastest/lowest load/lowest latency servers that are closest to you from a connection standpoint. I'm going to guess that the main pipe that traffic takes coming from across the pond/Tel Aviv exits in NY. The NordVPN API I use basically gives me a list of about 30 servers that it sorts in fastest order, and I pick the top 5 to use. I noticed that even the vast majority of these 30 servers are all located in the same city. It did the same thing for me when I was testing locally to Atlanta, and when picking other countries. These are what NordVPN programmatically recommends... so who am I to argue, right? LOL. It would be interesting to see what location these recommended servers are that it recommends using a tool like this https://www.iplocation.net/ip-lookup -- and I would also be scratching my head if they're not all NY servers. ;)
 

monakh

Regular Contributor
Aha, I FORGOT to mention the 'smoking gun'. There is NO log being generated as part of the script. Sorry, should have led with that! I have started it again, let's see what happens. What I meant to say earlier is that I have given up on what state: 2 means because it never seems to change even though the WAN goes offline (an entry in the log and everything yet it doesn't change).

I updated the post above with some sys log entries. If I were to guess, it would be a memory leak being caused by something (but only when the scripts are running). I have been checking the scMerlin stats once in a while and the remaining memory is in double-digits MB. When I left the router alone without running AMTM, VPNMON or the WAN-check script, there were no reboots for two days.

OK, the connection points to the cities in terms of speed/load/latency make sense. Wish I could diversify though!

Edit: K 20 minutes later, memory is down to < 200 MB. It's definitely a memory leak. The question is what? It's only happening when I run the scripts (they are both running in their own screen). Can't be screen, that's decades-old solid code!
 
Last edited:

Viktor Jaep

Very Senior Member
Aha, I FORGOT to mention the 'smoking gun'. There is NO log being generated as part of the script. Sorry, should have led with that! I have started it again, let's see what happens.
So yeah, it would need to run continuously to be able to generate any log entries should the router be changing wan states...
I updated the post above with some sys log entries. If I were to guess, it would be a memory leak being caused by something (but only when the scripts are running). I have been checking the scMerlin stats once in a while and the remaining memory is in double-digits MB. When I left the router alone without running AMTM, VPNMON or the WAN-check script, there were no reboots for two days.
Wow... I don't know what to make of it. Mesh client means that it's looking for a secondary router to join to the mesh, or perhaps you had a mesh client before that it's not liking and can't get rid of? I would recommend posting this in the main Merlin thread, and seeing if someone might be able to help analyze that... it may need to get run by RMerlin.
OK, the connection points to the cities in terms of speed/load/latency make sense. Wish I could diversify though!
That's why I created SuperRandom(r)!! :p

Edit: K 20 minutes later, memory is down to < 200 MB. It's definitely a memory leak. The question is what? It's only happening when I run the scripts (they are both running in their own screen). Can't be screen, that's decades-old solid code!
Again... more tell-tale signs that we may be dealing with some bugs here. I'd run that by the main thread as well... You might be able to use the tool Top or HTop to see if you can find out what's taking up that memory?
 

monakh

Regular Contributor
And another ten minutes after that, reboot. Looks like it's only happening now with the scripts. Let me revert back to the stable v2.22 just to rule out VPNMON. Let's do the basic troubleshooting before I mention it in the Merlin thread, he's super-no-nonsense, I need to have my ducks in a row :D

Can super-random work in tandem with recommended servers? That would awesome!
 

Viktor Jaep

Very Senior Member
And another ten minutes after that, reboot. Looks like it's only happening now with the scripts. Let me revert back to the stable v2.22 just to rule out VPNMON. Let's do the basic troubleshooting before I mention it in the Merlin thread, he's super-no-nonsense, I need to have my ducks in a row :D
I don't know of anything in any script that would cause a crash... I once built a proof of concept script that exposed a flaw in the AC86U that proved that a simple NVRAM GET statement would hang the script... but it didn't reboot anything. :) I don't think reversion is going to help either... but let me know how it goes, and yes... definitely have your ducks in a row. lol

Also know you are basically running a preview version for the AXE16000... nobody else is on that level of code yet. So I'm sure he's going to be very interested in hearing about this. And the memory leak behavior as well! ;)

Can super-random work in tandem with recommended servers? That would awesome!
I think the next step here would be to allow you to pick which cities you'd like to get recommended servers from. Right now, I'm just giving you the fastest ones available. :)
 

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