Open nielsek opened 1 year ago
Routes need not be created by stopping/starting the openvpn process - just calling ip route add ... dev tunX
to add a route to an existing tunX will work fine (and iroute
will work fine even if OpenVPN did not configure the route in question).
This said, if you use DCO (2.6.0 and up, on Linux and FreeBSD), iroute
s are always system routes, so the "dynamic iroute" part is already happening (because DCO is not using the internal OpenVPN server routing table any longer).
The feature was about dynamically changing iroutes after updating the OS's routing table. The latter can be altered without restarting the server but changing the iroute table currently needs a server restart.
That said, the patch was made a long time ago and is probably untested. I did not follow up as personally I haven't felt a real need for this. Not sure whether it's worthwhile to spend time to resurrect it.
@cron2 should we consider this ticket as won't fix, since the requested behavior can be implemented by using DCO?
It can't. See Selva's last post.
Describe the feature
Description copied from the old issue tracker: https://community.openvpn.net/openvpn/ticket/1046
Implementation behavior
In the old issue there is a reference to an implementation of this feature that @selvanair has made, which adds a new
--add-iroute
management command: https://github.com/selvanair/openvpn/commits/manage-add-irouteThe implementation was never proposed as a PR due to the lack of a way of deleting routes in the same fashion, however as later discussed in the old issue, the implementation does support overwriting routes, and deletion of routes will still happen on client reconnect if not persisted to config. That is perfectly fine, at least for our usecase, where dynamic routes are appended to config (never deleted).
Implementation description from https://github.com/selvanair/openvpn/commit/73825fee644167d0c9efc1b1e085337f1d45fffa :
Additional context
This feature would be very helpful for us, since we are currently disturbing all VPN traffic when a new route is added, which happens dynamically.