What's new

WANFailover Dual WAN Failover Script

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

No just turn off the ASUS settings and it should detect the change
Thanks , i missed it somehow ,Got it working
Amazing script , This should be incorporated into amtm . Wish it had a web UI for simplicity .
Otherwise all is good .Kudos to the dev
 
Thanks , i missed it somehow ,Got it working
Amazing script , This should be incorporated into amtm . Wish it had a web UI for simplicity .
Otherwise all is good .Kudos to the dev
Thank you! Glad you like it! I will look into adding a Web UI later on, I work on this thing in my free time and I haven't done anything major with ASP in awhile so would take some refreshing on my end.
 
Last edited:
For me, I see the script is working for a few hours, but then it suddenly stops.
This is just a snippet from syslog. There are no script related entries after the last one.

Code:
Jun  7 01:58:00 wan-failover.sh: WAN Status - wan0 enabled
Jun  7 01:58:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xxx.xx dev eth0
Jun  7 01:59:00 wan-failover.sh: WAN Status - wan0 enabled
Jun  7 01:59:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xxx.xx dev eth0
...
Code:
Jun  7 04:28:00 wan-failover.sh: WAN Status - wan0 enabled
Jun  7 04:28:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xxx.xx dev eth0
Jun  7 04:29:00 wan-failover.sh: WAN Status - wan0 enabled
Jun  7 04:29:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xxx.xx dev eth0
Jun  7 04:30:00 wan-failover.sh: WAN Status - wan0 enabled
Jun  7 04:30:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xxx.xx dev eth0
Jun  7 04:31:00 wan-failover.sh: WAN Status - wan0 enabled
Jun  7 04:31:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xxx.xx dev eth0
Jun  7 04:32:00 wan-failover.sh: WAN Status - wan0 enabled
Jun  7 04:32:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xxx.xx dev eth0
Jun  7 04:33:00 wan-failover.sh: WAN Status - wan0 enabled
Jun  7 04:33:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xxx.xx dev eth0
Jun  7 04:34:00 wan-failover.sh: WAN Status - wan0 enabled
Jun  7 04:34:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xxx.xx dev eth0

Any suggestions?
 
For me, I see the script is working for a few hours, but then it suddenly stops.
This is just a snippet from syslog. There are no script related entries after the last one.

Code:
Jun  7 01:58:00 wan-failover.sh: WAN Status - wan0 enabled
Jun  7 01:58:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xxx.xx dev eth0
Jun  7 01:59:00 wan-failover.sh: WAN Status - wan0 enabled
Jun  7 01:59:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xxx.xx dev eth0
...
Code:
Jun  7 04:28:00 wan-failover.sh: WAN Status - wan0 enabled
Jun  7 04:28:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xxx.xx dev eth0
Jun  7 04:29:00 wan-failover.sh: WAN Status - wan0 enabled
Jun  7 04:29:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xxx.xx dev eth0
Jun  7 04:30:00 wan-failover.sh: WAN Status - wan0 enabled
Jun  7 04:30:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xxx.xx dev eth0
Jun  7 04:31:00 wan-failover.sh: WAN Status - wan0 enabled
Jun  7 04:31:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xxx.xx dev eth0
Jun  7 04:32:00 wan-failover.sh: WAN Status - wan0 enabled
Jun  7 04:32:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xxx.xx dev eth0
Jun  7 04:33:00 wan-failover.sh: WAN Status - wan0 enabled
Jun  7 04:33:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xxx.xx dev eth0
Jun  7 04:34:00 wan-failover.sh: WAN Status - wan0 enabled
Jun  7 04:34:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xxx.xx dev eth0

Any suggestions?

Something is causing your device not to create the route for WAN0 and it is getting stuck trying to create it. What model and version firmware are you running?
 
I have an AC86U with latest 386.7 alpha firmware. I guess it's the alpha firmware then.
 
I have an AC86U with latest 386.7 alpha firmware. I guess it's the alpha firmware then.
I haven't tested with 386.7 firmware, the script is for 386.5.2.
 
Anyone using on a AC86U with the 386.5.2 ?
 
No, I have not tried it but….. I would like to utilize it. I am using the Firewalla Gold and the main reason I got it was dual WAN failover / firewall duties. It works great for that purpose but I am not a fan of a “cloud controlled” based firewall. I realize am using a pair of “dinosaurs“ but I like them better than anything else I tried. Thankfully Amazon has a good return policy. :)
 
My wife will be out of the house tomorrow morning, so I will give it a try and see what happens. :)
 
My wife will be out of the house tomorrow morning, so I will give it a try and see what happens. :)
Gotcha, let me know if you run into any issues.
 
Another question, I am in a double NAT on both ISP connections. Does that impact functionality of the script?
 
Another question, I am in a double NAT on both ISP connections. Does that impact functionality of the script?
I don’t foresee an issue as long as you can do ICMP echo requests out of both, then that would be a firewall issue.
 
I don’t foresee an issue as long as you can do ICMP echo requests out of both, then that would be a firewall issue.

Yes, ICMP currently works with no issues.
 
Yes, ICMP currently works with no issues.
You should be good to go then, thanks to @rlj2 I think we were able to get through the double NAT hurdles and it does the same checks for both WAN interfaces.
 
So I should be able to run the install script, answer the questions and it should just work? Right now I am running AMTM with Skynet, YazDHCP and scMerlin scripts. I changed my AC86U from AP mode to router mode in prep for installing this script.
 
So I should be able to run the install script, answer the questions and it should just work? Right now I am running AMTM with Skynet, YazDHCP and scMerlin scripts. I changed my AC86U from AP mode to router mode in prep for installing this script.

I use SkyNet and it works with it fine (script restarts firewall service after switching). I want to say someone had an issue with one of the Yaz scripts because the rules were hard coded for wan0 and not active wan interface but they just changed that script (Yaz) to use the nvram variable and it resolved that issue. Yea just install script and set options, if you don’t have factory failover disabled it will disable the script until you do, it will tell you in logging why it is disabled.
 
Also I was suggested to add a donate button to the repo so I did.
 
What are your recommended starting points for these settings?

- Ping Count:
- Ping Timeout:
- WAN Disabled Timer:
 

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