Static route to second wan subnet

maxime

New Around Here
Hi to everybody!
I've two FTTH Lines connected to my RT-AC86U:
- Line1 (1Gbit/300Mbit) set as primary, Wan (PPOE) direct connected to the ISP's Ont
- Line2 (1Gbit/1Gbit) set ad secondary, Lan connected to a FritzBox! Router (connected to the secondary ISP's Ont)

I would have liked to use dual Wan load balancing, but I had many problems (delays browsing internet, timeout pages loading, Google Home is unusable, skype or whatsapp call problems, etc...), so I decided to set dual Wan in Fail Over.
My problem is that I would like to reach some Host on the second Wan subnet... Is there a way to do that? Thanks for your support!
 

Smokey613

Very Senior Member
I too would like to route traffic destined for a specific IP out my secondary failover WAN which is using LAN port 1. I have done this in pfsense, Untangle, Firewalla Gold and other routers but I cannot seem to be able to get this accomplished on my RT-AC86U.
 

ColinTaylor

Part of the Furniture
I too would like to route traffic destined for a specific IP out my secondary failover WAN which is using LAN port 1.
This is a contradiction. If you're using Fail Over mode then by definition the secondary WAN interface is inactive when the primary interface is up. To be able to route selected traffic through different interfaces both interfaces need to be active. That's only possible in Load Balance mode. When in that mode you have the option to specify additional routing rules.
 
Last edited:

Smokey613

Very Senior Member
Since I am running @Ranger802004 Dual WAN script, I was hoping I could reach the web interface of my bridged cable modem ( ip is 192.168.100.1) on failover WAN which is using LAN port 1. It shows in Hot-Standby and I can ping the internet IP assigned to that interface. Oh well…..
 

Ranger802004

Very Senior Member
Since I am running @Ranger802004 Dual WAN script, I was hoping I could reach the web interface of my bridged cable modem ( ip is 192.168.100.1) on failover WAN which is using LAN port 1. It shows in Hot-Standby and I can ping the internet IP assigned to that interface. Oh well…..
If you have the WAN1 Routing Table (200) with a default route (My WAN-Failover script creates this during WAN Status Checks), then you can add this IP Rule to your wan-event for the Web GUI to be accessible even when it is the Secondary WAN. You would just change the 2 references to the IP Address to whatever the Web GUI IP Address would be for that device. My script will also create the necessary MASQUERADE rule for this to work as well (If NAT is enabled for WAN1).

Code:
if [[ "$(nvram get wan1_enable)" == "1" ]] && [[ "$(nvram get wan1_auxstate_t)" == "0" ]] && [[ "$(nvram get wan1_state_t)" == "2" ]] && [ -z "$(ip rule list from all to 192.168.100.1 lookup 200 priority 100)" ] >/dev/null;then
  ip rule add from all to 192.168.100.1 lookup 200 priority 100
fi
 

Smokey613

Very Senior Member
Where would I add that ?

UPDATE: I located the wan-event in /jffs/scripts

Do I add that before the command for your failover script?
 
Last edited:

Ranger802004

Very Senior Member
Where would I add that ?

UPDATE: I located the wan-event in /jffs/scripts

Do I add that before the command for your failover script?
Put it before with a space between and should be fine, basically everytime there is a WAN Event it will check if WAN1 is Connected and plugged in and if the rule isn't there, add it.
 

Similar threads

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