route option deleting routes it didn't set
Hi,
We got a bug report at Debian [1] regarding the route option. It turns out that if a route added by openvpn is later modified (removed and added to other iface), openvpn will modify (delete) the later one.
As the bug submitter states, maybe openvpn should specify the device it wants the route deleted from.
[1] http://bugs.debian.org/251304
Signature · 5 lines
Alberto Gonzalez Iniesta | BOFH excuse #263: agi@(agi.as|debian.org) | It's stuck in the Web. Encrypted mail preferred | Key fingerprint = 9782 04E7 2B75 405C F5E9 0C81 C514 AF8E 4BA4 01C3
Quoted 9 lines · Alberto Gonzalez Iniesta
Hi,
We got a bug report at Debian [1] regarding the route option. It turns out that if a route added by openvpn is later modified (removed and added to other iface), openvpn will modify (delete) the later one.
As the bug submitter states, maybe openvpn should specify the device it wants the route deleted from.
I think openvpn's routing options are intended for 'typical use' only. It is impossible for openvpn to know each and every non-trivial setup possible.
If you modify openvpn-created route after it starts, your setup is at least a bit non-typical.
Use:
--route-up cmd
Execute shell command cmd after routes are added, subject to --route-delay.
--route-noexec
Don't add or remove routes automatically. Instead pass routes to --route-up script using environmental variables.
--up cmd
Shell command to run after successful TUN/TAP device open (pre --user UID change). The up script is useful for specifying route commands which route IP traffic destined for private sub- nets which exist at the other end of the VPN connection into the tunnel.
or, if you are really drowning in tons of interfaces going up and down, run routing daemon, like zebra. I did not need it, yet, but eventually will do :) --
vda
Quoted 11 lines · Denis Vlasenko
Quoted 9 lines · Alberto Gonzalez Iniesta
Hi,
We got a bug report at Debian [1] regarding the route option. It turns out that if a route added by openvpn is later modified (removed and added to other iface), openvpn will modify (delete) the later one.
As the bug submitter states, maybe openvpn should specify the device it wants the route deleted from.
Quoted 6 lines
I think openvpn's routing options are intended for 'typical use' only. It is impossible for openvpn to know each and every non-trivial setup possible.
If you modify openvpn-created route after it starts, your setup is at least a bit non-typical.
I'd have to agree here that sensing cases where the user modifies the routes set by OpenVPN through the use of the --route directive is beyond the scope of what --route is meant to accomplish. It would be better to just use --up/--down scripts in this case.
James