core icon indicating copy to clipboard operation
core copied to clipboard

Multi Wan- switching GW and static route

Open advcron opened this issue 8 years ago • 7 comments

18.1.12 - still does not work 18.7.r1 -still does not work

I want add static route and multiwan (Please correct me if I was this wrong). My steps:

  1. Add 3 Gateway (System - Gateway -> ALL -> Single) WAN_PPPOE - Main GW Gateway_2 - Backup GW Serwer_OpenVPN_GW - For static route (route one subnet)
  2. Add GW group for multiwan (System - Gateway -> ALL -> Group) WAN1 - Tier1 WAN2 - Tier2 Serwer_OpenVPN - Tier-Never
  3. Add static route for openvpn subnet (System -> Configuration -> Route - Add)
  4. Add Firewall rule for static route and for multiwan rule

When WAN pppoe is down and firewall option > Default gateway switching is enebled the routes looks:

ipv4 default 192.168.0.247 UGS 85 1500 em0 lan ipv4 10.3.4.0/29 link#10 U 61557 1500 em0_vlan100 WAN2 ipv4 10.3.4.3 link#10 UHS 0 16384 lo0 ipv4 127.0.0.1 link#7 UH 49857 16384 lo0 ipv4 172.25.100.0/26 link#11 U 0 1500 em0_vlan10 MGM_ZONE ipv4 172.25.100.1 link#11 UHS 0 16384 lo0 ipv4 172.25.101.0/26 link#12 U 69 1500 em0_vlan11 SRVALL_ZONE ipv4 172.25.101.1 link#12 UHS 0 16384 lo0 ipv4 172.30.0.0/24 192.168.0.247 UGS 0 1500 em0 lan ipv4 192.168.0.0/24 link#1 U 9290 1500 em0 lan

The default gateway set to Serwer_OpenVPN gate not to Gateway_2. This couse that opnsense has no internet connection (I think output trafiic goes through default GW in this example through Server_OpenVPN_GW) On station there is internet connection, becouse traffic goes through Gateway_2 (set Gateway to Group_WAN in firewall LAN zone).

I think it is not normal behavior. (Default gateway must be chosen from WAN_GROUP (Tier1-Tier5)

1a

1

4

2

3a

advcron avatar Jul 19 '18 11:07 advcron

Default gateway switching does not use gateway groups. RC2 will have a fix where you can disable your gateway or set it to "force down" in order to skip the gateway switching to that particular gateway.

fichtner avatar Jul 19 '18 11:07 fichtner

When "Default gateway switching" not thick multiwan not work. After MainGate down the workstation on LAN don't have internet connection. DNS resolve ok but: ping google.com google.com [172.217.20.174] z 32 data byte: Answer 192.168.0.2: Destination host not reachable Answer 192.168.0.2: Destination host not reachable Answer 192.168.0.2: Destination host not reachable

advcron avatar Jul 19 '18 11:07 advcron

Please take a look at https://docs.opnsense.org/manual/how-tos/multiwan.html

fichtner avatar Jul 19 '18 12:07 fichtner

I do this from that How'to.

advcron avatar Jul 19 '18 12:07 advcron

Sorry, I cannot give setup support on my open source clock. You could try the forum instead. https://forum.opnsense.org/

fichtner avatar Jul 19 '18 12:07 fichtner

OK. Thank you for your answers.

advcron avatar Jul 19 '18 12:07 advcron

For local sevices like Openvpn Client you can only have two stable WAN since there is No method to stage Gateway priority. It only works for traffic going through the Firewall.

As said there will be an option to disable such gateways

mimugmail avatar Jul 20 '18 05:07 mimugmail