What's new
  • 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!

VPNMON VPNMON-R3 v1.8.2 -Nov 23, 2025- Monitor OpenVPN/Wireguard WAN/Dual-WAN Health & Random Reset Multiple Connections (Available in AMTM!) - v1.8.3Beta2

If I understand correctly to change the ssl connection host I would have to edit vpnmon script.

##-------------------------------------##
## Added by Martinski W. [2024-Oct-05] ##
##-------------------------------------##
readonly PING_HOST_Deflt="8.8.8.8"

From checkwan function()

# Using Google's DNS server as default to test for WAN connectivity over verified SSL Handshake
wandownbreakertrip=0
testssl="$PING_HOST_Deflt"

Maybe a good candidate to make configurable.
It's already configurable, under the settings. 😋
 
I guess I did not think it would also work for wan check.
( 2) : Custom PING host to determine VPN health : 1.1.1.1
 
I guess I did not think it would also work for wan check.
( 2) : Custom PING host to determine VPN health : 1.1.1.1
Probably should tweak that wording. Thanks! But yeah, it's used for both.
 
On the subject of Asus router date/time/daylight saving time, I wrote a sanity checker script which attempts to display your router's settings in an easier to understand format
Code:
echo "========================================================"
asus_timezone=$(nvram get time_zone)
echo "Daylight Saving Time Zone (Asus): ${asus_timezone}"
dst_enabled=$(nvram get time_zone_dst)
echo "Daylight Saving Time enabled: ${dst_enabled}"
dst_all=$(nvram get time_zone_dstoff)
echo "Daylight Saving Time Change Asus: ${dst_all}"
dst_iana=$(strings /etc/localtime | tail -1)
echo "Daylight Saving Time Change IANA: ${dst_iana}"
echo "========================================================"
dst_Spring=$(echo ${dst_all} | cut -d "," -f 1)
echo "Spring forward: ${dst_Spring}"
dst_Spring_month=$(echo ${dst_Spring} | cut -d "M" -f 2 | cut -d "." -f 1)
echo "Spring forward month: ${dst_Spring_month}"
dst_Spring_weekofmonth=$(echo ${dst_Spring} | cut -d "." -f 2)
echo "Spring forward week of month: ${dst_Spring_weekofmonth}"
dst_Spring_dayofweek=$(echo ${dst_Spring} | cut -d "." -f 3 | cut -d "/" -f 1)
echo "Spring forward day of week: ${dst_Spring_dayofweek} (0=Sunday)"
dst_Spring_hourofday=$(echo ${dst_Spring} | cut -d "/" -f 2)
echo "Spring forward hour of day: ${dst_Spring_hourofday}"
echo "========================================================"
dst_Fall=$(echo ${dst_all} | cut -d "," -f 2)
echo "Fall backward: ${dst_Fall}"
dst_Fall_month=$(echo ${dst_Fall} | cut -d "M" -f 2 | cut -d "." -f 1)
echo "Fall backward month: ${dst_Fall_month}"
dst_Fall_weekofmonth=$(echo ${dst_Fall} | cut -d "." -f 2)
echo "Fall backward week of month: ${dst_Fall_weekofmonth}"
dst_Fall_dayofweek=$(echo ${dst_Fall} | cut -d "." -f 3 | cut -d "/" -f 1)
echo "Fall backward day of week: ${dst_Fall_dayofweek} (0=Sunday)"
dst_Fall_hourofday=$(echo ${dst_Fall} | cut -d "/" -f 2)
echo "Fall backward hour of day: ${dst_Fall_hourofday}"
echo "========================================================"
echo "Current month: $(date +"%m (%B)")"
current_week_of_month=$(( $(date +%U) - $(date +%U -d "$(date +%Y-%m-01)") + 1 ))
echo "Current week of month: ${current_week_of_month}"
echo "Current day of week: $(date +"%w (%A)")"
echo "Current hour of day: $(date +"%H")"
echo "========================================================"
date +"Local week of year: %U %nLocal day of year: %j %nLocal date: %A, %B %e, %Y %nLocal 12: %r %Z %z "
echo "========================================================"
echo "Local 24: $(date -R)"
echo "UTC 24: $(date -u)"
echo "========================================================"
 
On the subject of Asus router date/time/daylight saving time, I wrote a sanity checker script which attempts to display your router's settings in an easier to understand format
Great one! I Just gave it a try and it displayed everything as intended.
The only error I got this time was:
strings: /etc/localtime: No such file or directory
I searched all my router's files and directories and wasn't able to find a file or directory named localtime
In a previous post in this thread while trying another code by you, I got the error:
strings: /rom/usr/share/zoneinfo/Asia/Kuwait: No such file or directory
But I was able to find a folder named zoneinfo under /opt/share/ and it eventually worked.
I'm just wondering is it just my old router that has old/deprecated paths?
 
Great one! I Just gave it a try and it displayed everything as intended.
The only error I got this time was:

I searched all my router's files and directories and wasn't able to find a file or directory named localtime
In a previous post in this thread while trying another code by you, I got the error:

But I was able to find a folder named zoneinfo under /opt/share/ and it eventually worked.
I'm just wondering is it just my old router that has old/deprecated paths?
It appears that Asus adopted the Linux standard sometime after your router. There would be a symbolic link from /etc/localtime to the corresponding file in the IANA timezone directory structure. This is what Linux uses if TZ is not defined.
On my system, /etc/localtime points to /rom/usr/share/zoneinfo/US/Eastern. The last text string in the timezone data file is "EST5EDT,M3.2.0,M11.1.0".
If your system supported this, /etc/localtime would point to a Kuwait or Riyadh file. The last text string in the file would be "AST-3".
You do not have the /rom/usr/share/zoneinfo IANA directory tree but you and I appear to have downloaded one in our Entware tree. In the Entware version of Kuwait and Riyadh, the string at the end is "<+03>-3".
 
We've got a BOGO deal going on today! VPNMON-R3 1.8.3 Beta 1 is also out today to test some of these experimental waters as well. This one has some significant changes, so please read the release notes, and keep an eye its behavior. Should be all good from the limited testing I've done, but value your feedback immensely!

What's new!?
v1.8.3b1 - (Release Date TBA)
- PATCH:
The Recovery Timeout should be defaulting to 1x, but it was inadvertently set to 3x. Thank you to @Tarek Yag for reporting this. Fixed!
- PATCH: Changed the wording for the custom PING host to "Custom PING host for connectivity checks" to bring more clarity that it wasn't just for VPN checks, but WAN and WG as well. Thanks to @scootertramp for reporting.
- PATCH: Changed the date/time to include the offset alongside the timezone. This is to give more visibility for those who aren't assigned a standard timezone name, and in some cases would fall back to using "GMT". Thanks to @Tarek Yag for reporting this, and for @EmeraldDeer providing a deep dive into the date command options.
- PATCH: Fixed some hardcoded instances where the recovery timeouts were set to 3, instead of using user-selected values.
- PATCH: Fixed some instances where the PINGHOST variable was hardcoded to 8.8.8.8, instead of using user-selected values.
- PATCH: Implemented recovery timeouts (if configured) and will apply to the WAN as well. Should the WAN have issues establishing an SSL connection with the user-selected PINGHOST, it will attempt to try the number of times that is user-specified.
- PATCH: Cut down all VPN/WG connection and reset times by half. Will continue to monitor closely for misbehavior. Done in response to @scootertramp noting the long time it takes to reconnect all VPN/WG connections after a WAN DOWN event.
- PATCH: Removed the functionality that would reset the Rx/Tx indicators to [UNKN] each time you went into a different menu item. It will now just show live stats no matter what. For consistent and more accurate results, wait your full 60 seconds (or whatever you've set your timer value to).

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

Significant Screenshots:

TZ Offset now being displayed... and many more enhancements in the background. :)

1764994599289.png
 
Last edited:
We've got a BOGO deal going on today! VPNMON-R3 1.8.3 Beta 1 is also out today to test some of these experimental waters as well. This one has some significant changes, so please read the release notes, and keep an eye its behavior. Should be all good from the limited testing I've done, but value your feedback immensely!
Thank You for the work you do that improves our experiences.
Installed V1.8.3b1 and re-enabled wan monitoring.

Question: Will we see wan connection attempts/re-tries in the same manner we see VPN/WG?
 
Last edited:
Question: Will we see wan connection attempts/re-tries in the same manner we see VPN/WG?
Yes! It's experimental at the moment. It will use the same number of retries you have set for your VPN/WG connections. Default is 1x. I've got mine set to 3x. For the WAN, it will pause 30 seconds between each attempt to give the WAN some time to recover. If it doesn't pass, it will kill all VPN/WG connections and drop to the WAN outage loop.

I have plans to give you more control over how long you want these events to span though a config screen. Right now, it will loop 1min intervals when a WAN isn't detected, then a 5min interval when it comes back online to test for WAN connectivity.
 
We've got a BOGO deal going on today! VPNMON-R3 1.8.3 Beta 1 is also out today to test some of these experimental waters as well. This one has some significant changes, so please read the release notes, and keep an eye its behavior. Should be all good from the limited testing I've done, but value your feedback immensely!

What's new!?
v1.8.3b1 - (Release Date TBA)
- PATCH:
The Recovery Timeout should be defaulting to 1x, but it was inadvertently set to 3x. Thank you to @Tarek Yag for reporting this. Fixed!
- PATCH: Changed the wording for the custom PING host to "Custom PING host for connectivity checks" to bring more clarity that it wasn't just for VPN checks, but WAN and WG as well. Thanks to @scootertramp for reporting.
- PATCH: Changed the date/time to include the offset alongside the timezone. This is to give more visibility for those who aren't assigned a standard timezone name, and in some cases would fall back to using "GMT". Thanks to @Tarek Yag for reporting this, and for @EmeraldDeer providing a deep dive into the date command options.
- PATCH: Fixed some hardcoded instances where the recovery timeouts were set to 3, instead of using user-selected values.
- PATCH: Fixed some instances where the PINGHOST variable was hardcoded to 8.8.8.8, instead of using user-selected values.
- PATCH: Implemented recovery timeouts (if configured) and will apply to the WAN as well. Should the WAN have issues establishing an SSL connection with the user-selected PINGHOST, it will attempt to try the number of times that is user-specified.
- PATCH: Cut down all VPN/WG connection and reset times by half. Will continue to monitor closely for misbehavior. Done in response to @scootertramp noting the long time it takes to reconnect all VPN/WG connections after a WAN DOWN event.
- PATCH: Removed the functionality that would reset the Rx/Tx indicators to [UNKN] each time you went into a different menu item. It will now just show live stats no matter what. For consistent and more accurate results, wait your full 60 seconds (or whatever you've set your timer value to).

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

Significant Screenshots:

TZ Offset now being displayed... and many more enhancements in the background. :)

View attachment 69393
Installed latest Beta on AX88 Pro and everything seems to be working smoothly. Thanks for your continuing efforts on this and other utility apps.
 
Yes! It's experimental at the moment. It will use the same number of retries you have set for your VPN/WG connections. Default is 1x. I've got mine set to 3x. For the WAN, it will pause 30 seconds between each attempt to give the WAN some time to recover. If it doesn't pass, it will kill all VPN/WG connections and drop to the WAN outage loop.
Great news to my ears!
I wish you all the best as a developer and users. I wish I have some extra free time these days to participate in the current beta release, but I have to wait for a stable release to benefit from all the new and exciting improvements.
Just to leave a note here for Viktor and everyone interested, I ended up after we last discussed the loop check timer, setting it to 30 seconds with 2 timeouts.
I have plans to give you more control over how long you want these events to span though a config screen. Right now, it will loop 1min intervals when a WAN isn't detected, then a 5min interval when it comes back online to test for WAN connectivity.
I'm so with the plans of lowering the timeouts and restarting intervals everywhere within the script, and of course making it user configurable. Just sharing my experience here, as a user who now experiences 1-2 disconnections per day on average, with a good 4 Mbps Wi-Fi Outdoor internet, I see 30s x 2 timeouts is very reasonable for my current use case (and many others, if not the new default).
Knowing that (before even using VPNMON) I dealt with countless outages and disconnections within the last year with a super bad 1 Mbps ADSL internet connection, and made countless experiments with timers/intervals/timeouts in desperate tries to keep my network as stable as possible throughout those times.
 
VPNMON-R3 - v1.8.3b1

Had my first Wan down event with the latest beta of vpnmon. Absolutely think the new visibility into why it is
detecting a wan issue is great. Recovery time for my four slots looks to be about two minutes faster.
I changed my recovery attempts back to three to see what that looks like.

Dec 08 2025 11:41:05 rt-be88u VPNMON-R3[21210] - ERROR: WAN Connectivity Issue Detected - Unable to establish SSL connection with 8.8.8.8
12 Dec 08 2025 11:41:05 rt-be88u VPNMON-R3[21210] - WARNING: WAN attempt 1 of 2 to allow connection to recover
13 Dec 08 2025 11:41:18 rt-be88u VPNMON-R3[21210] - ERROR: WAN Connectivity Issue Detected - Unable to establish SSL connection with 8.8.8.8
14 Dec 08 2025 11:41:18 rt-be88u VPNMON-R3[21210] - WARNING: WAN attempt 2 of 2 to allow connection to recover
15 Dec 08 2025 11:41:28 rt-be88u VPNMON-R3[21210] - WARNING: WAN failed to respond after 2 attempts
16 Dec 08 2025 11:41:53 rt-be88u VPNMON-R3[21210] - WARNING: WAN Link Detected -- Trying to Reconnect/Reset VPN/WG
17 Dec 08 2025 11:47:10 rt-be88u VPNMON-R3[21210] - WARNING: VPN1 has disconnected
18 Dec 08 2025 11:47:17 rt-be88u VPNMON-R3[21210] - INFO: VPN1 Connection Restarted [SEQ] - New Server: xxx.xxx.xxx.xxx
19 Dec 08 2025 11:47:32 rt-be88u VPNMON-R3[21210] - INFO: Email notification was sent successfully [FAILURE: VPN Slot 1 has Disconnected]
20 Dec 08 2025 11:47:37 rt-be88u VPNMON-R3[21210] - INFO: VPN Director Routing Service Restarted
21 Dec 08 2025 11:47:43 rt-be88u VPNMON-R3[21210] - INFO: spdMerlin Interfaces Reset
22 Dec 08 2025 11:48:01 rt-be88u VPNMON-R3[21210] - WARNING: VPN2 has disconnected
23 Dec 08 2025 11:48:07 rt-be88u VPNMON-R3[21210] - INFO: VPN2 Connection Restarted [SEQ] - New Server: xxx.xxx.xxx.xxx
24 Dec 08 2025 11:48:23 rt-be88u VPNMON-R3[21210] - INFO: Email notification was sent successfully [FAILURE: VPN Slot 2 has Disconnected]
25 Dec 08 2025 11:48:29 rt-be88u VPNMON-R3[21210] - INFO: VPN Director Routing Service Restarted
26 Dec 08 2025 11:48:34 rt-be88u VPNMON-R3[21210] - INFO: spdMerlin Interfaces Reset
27 Dec 08 2025 11:48:53 rt-be88u VPNMON-R3[21210] - WARNING: WGC1 has disconnected
28 Dec 08 2025 11:48:59 rt-be88u VPNMON-R3[21210] - INFO: WGC1 Connection Restarted [SEQ] - New Server: US-MA | xxx.xxx.xxx.xxx
29 Dec 08 2025 11:49:15 rt-be88u VPNMON-R3[21210] - INFO: Email notification was sent successfully [WARNING: WG Slot 1 Tunnel Disconnected]
30 Dec 08 2025 11:49:20 rt-be88u VPNMON-R3[21210] - INFO: VPN Director Routing Service Restarted
31 Dec 08 2025 11:49:26 rt-be88u VPNMON-R3[21210] - INFO: spdMerlin Interfaces Reset
32 Dec 08 2025 11:49:45 rt-be88u VPNMON-R3[21210] - WARNING: WGC2 has disconnected
33 Dec 08 2025 11:49:51 rt-be88u VPNMON-R3[21210] - INFO: WGC2 Connection Restarted [SEQ] - New Server: US-MA | xxx.xxx.xxx.xxx
34 Dec 08 2025 11:50:06 rt-be88u VPNMON-R3[21210] - INFO: Email notification was sent successfully [WARNING: WG Slot 2 Tunnel Disconnected]
35 Dec 08 2025 11:50:11 rt-be88u VPNMON-R3[21210] - INFO: VPN Director Routing Service Restarted
36 Dec 08 2025 11:50:17 rt-be88u VPNMON-R3[21210] - INFO: spdMerlin Interfaces Reset
 
Had my first Wan down event with the latest beta of vpnmon. Absolutely think the new visibility into why it is
detecting a wan issue is great. Recovery time for my four slots looks to be about two minutes faster.
I changed my recovery attempts back to three to see what that looks like.
That's great news, @scootertramp... Now the next step is to build in some.options to let you choose some of your own custom timeout lengths. I appreciate the update!
 
New v1.8.3b2 available! Added the capability of giving you more control over the various WAN-related timers in VPNMON-R3. Hope this helps even further, @scootertramp!

What's new!?
- PATCH:
Added Config Menu option #16: "WAN Recovery, Down, Reconnect Timers", giving you more control over the amount of time the various stages of dealing with a WAN DOWN situation, from the amount of time your WAN can try to recover on its own, to how long between checking to see if the WAN has become available again, to the amount of time given to let the router recover after the WAN has come back up again before reconnecting all tunnels.

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

Significant Screenshots:

Giving you some more flexibility in being able to choose what timer values you're more comfortable with...

1766104750332.png
 
New v1.8.3b2 available! Added the capability of giving you more control over the various WAN-related timers in VPNMON-R3. Hope this helps even further, @scootertramp!

What's new!?
- PATCH:
Added Config Menu option #16: "WAN Recovery, Down, Reconnect Timers", giving you more control over the amount of time the various stages of dealing with a WAN DOWN situation, from the amount of time your WAN can try to recover on its own, to how long between checking to see if the WAN has become available again, to the amount of time given to let the router recover after the WAN has come back up again before reconnecting all tunnels.

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

Significant Screenshots:

Giving you some more flexibility in being able to choose what timer values you're more comfortable with...

View attachment 69613
Wow, some excellent choices. I think between the Recovery Timer and the existing Recovery Attempts the issues I have
seen from ping failures should be resolved. For whatever reason stability has been much improved this last week and half.
Now with the recent improvements @Martinski made for the connmon export and vpnmon using the same ping server target I
can keep a better eye on things.


1766106603597.png
 
Wow, some excellent choices. I think between the Recovery Timer and the existing Recovery Attempts the issues I have
seen from ping failures should be resolved. For whatever reason stability has been much improved this last week and half.
Now with the recent improvements @Martinski made for the connmon export and vpnmon using the same ping server target I
can keep a better eye on things.


View attachment 69614
Quick question, @scootertramp ... what are you using to collect and display this data in Grafana? Is there some existing dashboard solution? That looks pretty cool!
 
Quick question, @scootertramp ... what are you using to collect and display this data in Grafana? Is there some existing dashboard solution? That looks pretty cool!
I am just using the the export capability in connmon to send the data to InfluxDB whenever it runs a ping test. Then I just set-up
InfluxDB as a datasource in Grafana and created the dashboard myself. I can share the jason export of the dahboard if you like.
It still needs some work as I am trying the learn flux query language.
 
I am just using the the export capability in connmon to send the data to InfluxDB whenever it runs a ping test. Then I just set-up
InfluxDB as a datasource in Grafana and created the dashboard myself. I can share the jason export of the dahboard if you like.
It still needs some work as I am trying the learn flux query language.
Thanks for letting me know. I thought I remembered there being a project out there that hooked into the router and provided reports like this (not using connmon), but I'll keep digging.
 
Thanks for letting me know. I thought I remembered there being a project out there that hooked into the router and provided reports like this (not using connmon), but I'll keep digging.
There is another method I am using to get router stats with Prometheus node exporter. This can be set-up on the router with opkg.
The Dashboard you can get from Grafana Labs.

Code:
agagne@rt-be88u:/tmp/home/root# opkg list | grep node-exporter
prometheus-node-exporter - 1.9.1-1 - Prometheus exporter for hardware and OS metrics exposed by *NIX kernels, written in Go with pluggable metric collectors.

1766143553968.png
 

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