What's new

WANFailover Dual WAN Failover Script ***v1.6.0 Released***

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

I appreciate the information.

If I make changes from Failover to Load balancing, do I need to run the install again or a simple restart of the script will do?
The router is going to force you to reboot for this change, the script should be fine to handle either mode out of the box. The configuration builds all of the default values for both from initial launch. Additionally, I wanted to clarify there was some chat about QoS in Load Balance Mode. Unfortunately this feature does disable with Load Balance Mode as does all of the Trend Micro features (AIProtection, QoS, etc).
 
Thanks for the response.

I did briefly tried the script over the weekend and I might need to send some debug logs, but I did noticed something whille trying it out during "Failover" mode:

- having FlexQoS enabled prior to installing the failover script I noticed the WAN packet overhead under the FlexQoS tab defaults back to '0' versus my selected custom setup of '18' (Cable/Docsis) when setting up Flex.

Not sure if Im being cleared but after setting up the script and choosing all options, the Flex WAN packet overhead is showing as '0'. Maybe im doing something wrong but i did choose setup QoS speeds manually versus automatic.

Ill have to try again and provide additional input if necessary.
 
Last edited:
Thanks for the response.

I did briefly tried the script over the weekend and I might need to send some debug logs, but I did noticed something whille trying it out during "Failover" mode:

- having FlexQoS enabled prior to installing the failover script I noticed the WAN packet overhead under the FlexQoS tab defaults back to '0' versus my selected custom setup of '18' (Cable/Docsis) when setting up Flex.

Not sure if Im being cleared but adter setting up the script and choosing all options, the Flex WAN packet overhead is showing as '0'. Maybe im doing something wrong but i did choose setup QoS speeds manually versus automatic.

Ill have to try again and provide additional input if necessary.
That is coming from the Config file for WAN Failover, it's not in the GUI yet to be modified but you can change it for now under /jffs/configs/wan-failover.conf

Code:
WAN0_QOS_OVERHEAD=0
WAN1_QOS_OVERHEAD=0
 
If anyone is having the issue with Load Balance Mode still having connections issues, please send me the output of the following command. I have identified a potential issue and would like more evidence to back up my theory, thank you.

Code:
iptables -t mangle -L OUTPUT -v -n
 
***v1.6.1-beta1 has been released***

To update to this version,, you must be configured running Dev Mode. Then go to Menu Option (6) Update.

v1.6.1-beta1 Release Notes:
Installation:
- During uninstallation, the script will now delete the script file. This change was necessary for AMTM integration

Enhancements:
- Added 386.9 to supported Firmware list
- switchwan argument can now be ran in an unattended mode to passively allow failover that doesn't require User Verification to failover.
- Added new Configuration Option: SCHEDULECRONJON. Enabled by default, this will control whether the Cron Job is scheduled or not for WAN Failover to run.
This is configurable in the Config Menu under Option 23: Configure Cron Job
- Added Load Balance Mode Settings to GUI Config Menu for WAN0 FWMark, WAN0 Mask, WAN1 FWMark, and WAN1 Mask.
- Changed CHECKNVRAM Default to Disabled for performance optimization. This feature should only be enabled on routers with issues accessing nvram.
Existing installations of WAN Failover will need this setting manually changed under Configuration Menu Option 12.

Fixes:
- Removed VPNMON-R2 integration. VPNMON-R2 is now capable of detecting failover events and resetting itself without WAN Failover.
 
When using a 2nd ISP with either failover or load balancing mode, would you recommend turning the WiFi radio off on the 2nd modem (its dual modem/router) and also within the Asus GUI are you also disabling the NAT for the secondary?

I noticed when i used it in Failover mode, my speeds overall got really....really slow to the point where nothing was loading.

I will need to this setup again but I could not pinpoint the slowdowns in WiFi speeds.
 
When using a 2nd ISP with either failover or load balancing mode, would you recommend turning the WiFi radio off on the 2nd modem (its dual modem/router) and also within the Asus GUI are you also disabling the NAT for the secondary?

I noticed when i used it in Failover mode, my speeds overall got really....really slow to the point where nothing was loading.

I will need to this setup again but I could not pinpoint the slowdowns in WiFi speeds.
You may be having issues with load balance mode different from that. QoS also sometimes causes slowdowns as well which there is a lot of other posts in this forum regarding performance issues with Trend Micro features.
 
You may be having issues with load balance mode different from that. QoS also sometimes causes slowdowns as well which there is a lot of other posts in this forum regarding performance issues with Trend Micro features.
Thanks for the information...I only tried failover mode but I think my mistake was connecting 2nd ISP to the 2.5G WAN port versus one of the available LAN ports. It can very well be using AIProtect and QoS plus some additional scripts. Not enough RAM.

I will try again and report!
 
@Ranger802004

Finally had my ISP01 go down on its own (I know, most people don't want that), but I wanted my ISP01 to go down on its own, with my logs in debug mode, so that I could get the logs you require in order to see if there is any fix available to get my FailOver to ISP02 (this works), to get my FailBack to ISP01 to be automatic (this does not work, and in previous tests has not worked.)

V1.6.0 Firmware - Failover/Failback Mode:

1. ISP01 (Primary WAN - Connected), ISP02 (Secondary WAN - Hot-Standby) - both ISP's are highspeed, and considered top tier.
2. ISP01 went down on its own
3. Failover to ISP02 - Failover SUCCESS, YazFi SUCCESS, AMTM email SUCCESS
4. ISP01 (Primary WAN) - Down/No ISP | ISP02 (Secondary WAN - Connected)

1. ISP01 Comes back online
2. Failback to ISP01 failed, and ISP02 continues to be Primary WAN at that time

REDACTED Debug logs to be sent in private message.
 
@Ranger802004

Finally had my ISP01 go down on its own (I know, most people don't want that), but I wanted my ISP01 to go down on its own, with my logs in debug mode, so that I could get the logs you require in order to see if there is any fix available to get my FailOver to ISP02 (this works), to get my FailBack to ISP01 to be automatic (this does not work, and in previous tests has not worked.)

V1.6.0 Firmware - Failover/Failback Mode:

1. ISP01 (Primary WAN - Connected), ISP02 (Secondary WAN - Hot-Standby) - both ISP's are highspeed, and considered top tier.
2. ISP01 went down on its own
3. Failover to ISP02 - Failover SUCCESS, YazFi SUCCESS, AMTM email SUCCESS
4. ISP01 (Primary WAN) - Down/No ISP | ISP02 (Secondary WAN - Connected)

1. ISP01 Comes back online
2. Failback to ISP01 failed, and ISP02 continues to be Primary WAN at that time

REDACTED Debug logs to be sent in private message.
I will review these and get back with you.
 
My router failed to switch back from to primary WAN after it's is back running up. Anything I do wrong here?
My router is ASUS AC86U running Merlin 386.9

Status.jpg


setting.jpg


Terminal.jpg
 
***v1.6.1-beta2 has been released***

To update to this version,, you must be configured running Dev Mode. Then go to Menu Option (6) Update.

v1.6.1-beta2 Release Notes:
Installation:
- During uninstallation, the script will now delete the script file. This change was necessary for AMTM integration

Enhancements:
- Added 386.9 to supported Firmware list
- switchwan argument can now be ran in an unattended mode to passively allow failover that doesn't require User Verification to failover.
- Added new Configuration Option: SCHEDULECRONJON. Enabled by default, this will control whether the Cron Job is scheduled or not for WAN Failover to run.
This is configurable in the Config Menu under Option 23: Configure Cron Job
- Added Load Balance Mode Settings to GUI Config Menu for WAN0 FWMark, WAN0 Mask, WAN1 FWMark, and WAN1 Mask.
- Changed CHECKNVRAM Default to Disabled for performance optimization. This feature should only be enabled on routers with issues accessing nvram.
Existing installations of WAN Failover will need this setting manually changed under Configuration Menu Option 12.
- Added initiate command argument to only create Routing Table Rules, IP Rules, and IPTables Rules. Additionally this can be ran from from the Main Menu.

Fixes:
- Removed VPNMON-R2 integration. VPNMON-R2 is now capable of detecting failover events and resetting itself without WAN Failover.
- General optimization of script
 
***v1.6.1-beta3 has been released***

To update to this version,, you must be configured running Dev Mode. Then go to Menu Option (6) Update.

v1.6.1-beta3 Release Notes:
Installation:
- During uninstallation, the script will now delete the script file. This change was necessary for AMTM integration

Enhancements:
- Added 386.9 to supported Firmware list
- switchwan argument can now be ran in an unattended mode to passively allow failover that doesn't require User Verification to failover.
- Added new Configuration Option: SCHEDULECRONJON. Enabled by default, this will control whether the Cron Job is scheduled or not for WAN Failover to run.
This is configurable in the Config Menu under Option 23: Configure Cron Job
- Added Load Balance Mode Settings to GUI Config Menu for WAN0 FWMark, WAN0 Mask, WAN1 FWMark, and WAN1 Mask.
- Changed CHECKNVRAM Default to Disabled for performance optimization. This feature should only be enabled on routers with issues accessing nvram.
Existing installations of WAN Failover will need this setting manually changed under Configuration Menu Option 12.
- Added initiate command argument to only create Routing Table Rules, IP Rules, and IPTables Rules.
- Load Balance Monitor will now check IP Rules by default of every 15 minutes to make sure all rules are properly configured. This will help resolve issues where the router adds improperly configured IPTables MANGLE rules.
- Visual Enhancements with prompts.

Fixes:
- Removed VPNMON-R2 integration. VPNMON-R2 is now capable of detecting failover events and resetting itself without WAN Failover.
- General optimization of script
- Resolved issue where some Failback emails were not being generated
- Resolved issue where WAN Failover was logging that QoS settings were being applied and restarting services if the non-Primary WAN failed during monitoring
 
***v1.6.1-beta3 has been released***

To update to this version,, you must be configured running Dev Mode. Then go to Menu Option (6) Update.

v1.6.1-beta3 Release Notes:
Installation:
- During uninstallation, the script will now delete the script file. This change was necessary for AMTM integration

Enhancements:
- Added 386.9 to supported Firmware list
- switchwan argument can now be ran in an unattended mode to passively allow failover that doesn't require User Verification to failover.
- Added new Configuration Option: SCHEDULECRONJON. Enabled by default, this will control whether the Cron Job is scheduled or not for WAN Failover to run.
This is configurable in the Config Menu under Option 23: Configure Cron Job
- Added Load Balance Mode Settings to GUI Config Menu for WAN0 FWMark, WAN0 Mask, WAN1 FWMark, and WAN1 Mask.
- Changed CHECKNVRAM Default to Disabled for performance optimization. This feature should only be enabled on routers with issues accessing nvram.
Existing installations of WAN Failover will need this setting manually changed under Configuration Menu Option 12.
- Added initiate command argument to only create Routing Table Rules, IP Rules, and IPTables Rules.
- Load Balance Monitor will now check IP Rules by default of every 15 minutes to make sure all rules are properly configured. This will help resolve issues where the router adds improperly configured IPTables MANGLE rules.
- Visual Enhancements with prompts.

Fixes:
- Removed VPNMON-R2 integration. VPNMON-R2 is now capable of detecting failover events and resetting itself without WAN Failover.
- General optimization of script
- Resolved issue where some Failback emails were not being generated
- Resolved issue where WAN Failover was logging that QoS settings were being applied and restarting services if the non-Primary WAN failed during monitoring
Hello guys, I have discovered some additional bugs that may cause the script to hang in certain conditions and am actively working on them to resolve, hoping to have an update out by today.
 
Hello @Ranger802004,
Did you know if your script work with @eibgrad's killswitch script ?
Because I tested yesterday on my RT-AC88U (386.7_2). Failover Wan and Lan1.
But the WAN was already disconnected.
 

Attachments

  • 2023-02-08 21_35_34-Paramètres.png
    2023-02-08 21_35_34-Paramètres.png
    276.9 KB · Views: 52
  • 2023-02-08 21_55_13-192.168.2.1 - PuTTY.png
    2023-02-08 21_55_13-192.168.2.1 - PuTTY.png
    196.1 KB · Views: 49
Hello @Ranger802004,
Did you know if your script work with @eibgrad's killswitch script ?
Because I tested yesterday on my RT-AC88U (386.7_2). Failover Wan and Lan1.
But the WAN was already disconnected.
I'm not familiar with what the script does but what issue are you having exactly?
 

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