Hi
I would like to route some traffics to default route for failover and failback.
Previously we had command feature on RUT240, but has it been removed from latest firmware 'RUT2_R_00.07.01.4.'?
Do we have any alternative to execute custom command when it fails over and back?
I will explain here about the context.
I have 2 interfaces mobile(wwan0) as the primary connection and wifi(wlan0) as the secondary connection.
And we establish a wireguard vpn connection on the active interface.
RUT240 set a route record to wireguard endpoint(ex 123.456.789.10) automatically when it activates the vpn connection for the first time. For instance when wwan0 is active, traffic to the wireguard endpoint will be routed to wwan0 as below.
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 0.0.0.0 0.0.0.0 U 1 0 0 wwan0
0.0.0.0 192.168.0.1 0.0.0.0 UG 2 0 0 wlan0
10.215.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wg_1
10.216.1.0 0.0.0.0 255.255.255.0 U 3 0 0 br-lan
123.456.789.10 0.0.0.0 255.255.255.255 UH 1 0 0 wwan0 <- this is the wireguard endpoint
And when I removed wwan0, and set Rule feature to route the wireguard endpoint to wlan0 It fails over successfully.
After the failover, routing table will be as below.
Destination Gateway Genmask Flags Metric Ref Use
Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 2 0 0 wlan0
10.215.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wg_1
10.216.1.0 0.0.0.0 255.255.255.0 U 3 0 0 br-lan
123.456.789.10 0.0.0.0 255.255.255.255 UH 1 0 0 wlan0 <- traffic to the wireguard endpoint is routed to wlan0 by the Rule feature.
But when I reactivate wwan0 with wlan0, the traffic to the wireguard endpoint stays being routed to wlan0 not wwan0.
So fail back feature does not work.
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 0.0.0.0 0.0.0.0 U 1 0 0 wwan0
0.0.0.0 192.168.0.1 0.0.0.0 UG 2 0 0 wlan0
10.215.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wg_1
10.216.1.0 0.0.0.0 255.255.255.0 U 3 0 0 br-lan
123.456.789.10 192.168.0.1 255.255.255.255 UGH 2 0 0 wlan0 <- traffic to the wireguard endpoint is supposed to be routed to wwan0. This is the problem.
Sorry it is complicated, but how can I solve this issue?
Sincerely,
Taketo