Re: Adding routes



Gilles PIETRI wrote:
I've looked into the code, and my conclusion was we can't do that without changing
the way nm-openvpn is wired in nm, or by doing it elsewhere (if-up script or another
hack not really involving nm-openvpn, and thus not so "fun", as it implies some
scripting).

Correct, NM currently establishes the default route only if not static routes are specified.

What I like about the nm-openvpn plugin is that it allows to connect through a VPN
without having to struggle with configuration files, and that all can be done either
with a preconfigured file or with a mouse. I guess it's pretty much the same as when
we only want to add a few subnets to be routed through the VPN, code-wise, but as I
don't know too well the thing, I haven't looked more into it.


openvpn also allows the server configuration to push routes, but the NM plugin is currently not handling them.

I've got some ideas on how to solve both of these issues (as well as the vpn gateway issue with openvpn TAP connections), but need to find some time to experiment with them. I'm thinking something along the lines of replacing the static_routes in the NMIP4Config structure with address/netmask/gateway tuples. The VPN's NMIP4Config would then use this to specify the custom/static routes. A default route tuple would also be added to the NMIP4Config structure, allowing VPN's to push a default route configuration. If this was left unset, NM would maintain its current behavior.

-casey



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]