Hi
thanks for the answer
i'm running with RUT2XX_R_00.01.05.1
the openvpn client is with TLS but no crypto
i added the route as static route, but it still deleted when the 4G connection is down.
For example, here are the route when everything works:
root@Teltonika-RUT240:~# ip r s
0.0.0.0/1 via 10.10.0.1 dev tun_c_IPC
default via 10.65.113.202 dev wwan0
10.10.0.0/24 dev tun_c_IPC proto kernel scope link src 10.10.0.2
10.65.113.200/30 dev wwan0 proto kernel scope link src 10.65.113.201
10.65.113.202 dev wwan0 proto static scope link src 10.65.113.201
128.0.0.0/1 via 10.10.0.1 dev tun_c_IPC
176.31.xxx.yyy via 10.65.113.202 dev wwan0 <this is the static route i added through the GUI
192.168.10.110 via 10.65.113.202 dev wwan0
192.168.11.0/24 dev br-lan proto kernel scope link src 192.168.11.4
194.51.3.56 via 10.65.113.202 dev wwan0
now, i remove the antenna, to force the GSM to get disconnected
and here is the route after it goes disconnected/reconnected through 4g;
Notice that the route to the VPN public ip has been removed...
root@Teltonika-RUT240:~# ip r s
0.0.0.0/1 via 10.10.0.1 dev tun_c_IPC
default via 10.65.22.4 dev wwan0
default via 10.65.22.4 dev wwan0 proto static src 10.65.22.3
10.10.0.0/24 dev tun_c_IPC proto kernel scope link src 10.10.0.2
10.65.22.0/29 dev wwan0 proto kernel scope link src 10.65.22.3
10.65.22.4 dev wwan0 proto static scope link src 10.65.22.3
128.0.0.0/1 via 10.10.0.1 dev tun_c_IPC
192.168.10.110 via 10.65.22.4 dev wwan0
192.168.11.0/24 dev br-lan proto kernel scope link src 192.168.11.4
194.51.3.56 via 10.65.22.4 dev wwan0
Openvpn will not reconnect, because there is the default route to 0.0.0.0 via the openvpn (down) tunnel, and not more route to the server through wwan0 :(
in the openvpn log i can see:
Mon Mar 25 13:47:34 2019 us=384651 Recursive routing detected, drop tun packet to [AF_INET]176.31.xxx.yyy
this is because it cannot find the route to the public vpn address.