I have a container which routes all its traffic via OpenVPN. This is done by OpenVPN via a combo of
0.0.0.0/1 via 10.8.8.17 dev tun0 188.8.131.52/1 via 10.8.8.17 dev tun0
which masks the
default route (which is still there when OpenVPN shuts down)
I need to explicitly add a route for a local network which would direct packets via
eth0 and not
This is manually done via
ip route add 10.10.10.0/24 via 10.10.11.254 dev eth0
after OpenVPN has started.
How can I do that automatically upon OpenVPN start?
I tried to add
route 10.10.10.0 255.255.255.0
.ovpn config file, but this leads to a new route via
tun0 (which is quite understandable as there was no specific information about the NIC to route through - but I did not see anything available in the doc either)
# ip route (...) 10.10.10.0/24 via 10.8.8.17 dev tun0
Is what I want to achieve doable though OpenVPN configuration or do I need to do it somehow outside the OpenVPN startup process?