OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: evan on August 06, 2022, 07:28:21 pm

Title: WAN failover scenario
Post by: evan on August 06, 2022, 07:28:21 pm
I have two wan connections.  Both are consumer connections using DHCP.

I would like to send all the traffic from one of my lan subnets out wan2 and the rest out of wan1.

If either wan link fails, I would like all traffic to be routed over the remaining connection regardless of source.

Setting up wan failover seems straightforward from reading but I am not sure I see an easy way to achieve the other goal.

Any advice would be appreciated.
Title: Re: WAN failover scenario
Post by: Vesalius on August 06, 2022, 08:05:13 pm
Create 2 separate gateway groups.

Gateway group 1 - Wan1 is tier 1 and Wan2 is tier 2 (primary Wan1 failover to Wan2)
Gateway group 2 - Wan2 is tier 1 and Wan1 is tier 2 (primary Wan2 failover to Wan1)

Now that you have 2 failover groups, Follow this link https://docs.opnsense.org/manual/how-tos/multiwan.html and choose the appropriate gateway group for each subnet firewall default allow rule and DNS.
Title: Re: WAN failover scenario
Post by: evan on August 06, 2022, 10:41:23 pm
Thanks!  I will try that out in the morning when I actually cut over to the opnsense device.
Title: Re: WAN failover scenario
Post by: evan on August 07, 2022, 07:19:28 pm
This all works really well.  Thanks again for the help!

Now that you have 2 failover groups, Follow this link https://docs.opnsense.org/manual/how-tos/multiwan.html and choose the appropriate gateway group for each subnet firewall default allow rule and DNS.

The only thing extra thing I had to do was create an alias that contained all my LAN networks and add an inbound pass rule to that destination to bypass the gateway setting.