route-ipv6 parameters & route prefixes
Hi guys
I'm used to pushing route options to the clients with explicit metrics. That works good for IPv4 with e.g.:
push "route 192.168.128.0 255.255.240.0 vpn_gateway 200"
However route-ipv6 doesn't accept the 'vpn_gateway' keyword and therefore I can't easily set a metric. I could indeed put the actual server IP in there but that's less flexible, partly because I have this routes section in a separate file included in multiple configs on the same machine.
Can we have 'route-ipv6' accepting the same keywords as 'route' for consistency? Please :)
BTW ideally, for even more consistency, modify 'route' (v4) to also accept "net/prefix" as well as the old-fashioned "net netmask". OpenVPN is one of the last programs where I still have to use netmasks instead of the more convenient prefixes. That'd be truly awesome :) (but not as important as the vpn_gateway support for route-ipv6 of course).
Thanks!
Michal
Hi,
Quoted 9 lines · Michal Ludvig
I'm used to pushing route options to the clients with explicit metrics. That works good for IPv4 with e.g.:
push "route 192.168.128.0 255.255.240.0vpn_gateway200"However route-ipv6 doesn't accept the '
vpn_gateway' keyword and therefore I can't easily set a metric. I could indeed put the actual server IP in there but that's less flexible, partly because I have this routes section in a separate file included in multiple configs on the same machine.
What are you trying to achieve?
Quoted 2 lines
Can we have 'route-ipv6' accepting the same keywords as 'route' for consistency? Please :)
Someone needs to do the work. It's somewhere on my TODO list, but I haven't seen a strong need yet, so other bits have been done earlier.
Quoted 5 lines
BTW ideally, for even more consistency, modify 'route' (v4) to also accept "net/prefix" as well as the old-fashioned "net netmask". OpenVPN is one of the last programs where I still have to use netmasks instead of the more convenient prefixes. That'd be truly awesome :) (but not as important as the
vpn_gatewaysupport for route-ipv6 of course).
Someone would need to implement that, in a backwards-compatible fashion.
I'm not, as I don't work on legacy IP support anymore.
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...Quoted 7 lines · Gert Doering
Hi,
Quoted 4 lines · Michal Ludvig
I'm used to pushing route options to the clients with explicit metrics. That works good for IPv4 with e.g.:
push "route 192.168.128.0 255.255.240.0vpn_gateway200"
Quoted 6 lines
Quoted 5 lines
However route-ipv6 doesn't accept the '
vpn_gateway' keyword and therefore I can't easily set a metric. I could indeed put the actual server IP in there but that's less flexible, partly because I have this routes section in a separate file included in multiple configs on the same machine.What are you trying to achieve?
I'm trying to set a metric for IPv6 route pushed from the OpenVPN server.
Long story, if you're asking why, is: we've got multiple OpenVPN gateways to our network, each in a different location. A VPN user can connect to any of them, or to more then one, and must have access to the whole network. Obviously I'm pushing the prefixes local for each location with a lower metric and the non-local prefixes with a higher metric. That way, even if a user has a tunnel up to two or more locations, the traffic to each location is always routed through the most direct tunnel with the lowest metric.
To make things a little more complicated I have both UDP and TCP endpoints in each location (TCP is there for users behind HTTP proxies for example) and most of their configs are shared, therefore I use the "vpn_gateway" placeholder that gets replaced for the VPN IP of the actual server, which is different between UDP and TCP on the same gateway. Without that placeholder I can't share the config with "push route-ipv6" options between UDP and TCP instances.
So that's what I'm trying to achieve. Hope that makes sense :)
Michal
Hi,
Quoted 14 lines · Michal Ludvig
Quoted 11 lines · Michal Ludvig
Quoted 9 lines
I'm used to pushing route options to the clients with explicit metrics. That works good for IPv4 with e.g.:
push "route 192.168.128.0 255.255.240.0vpn_gateway200"However route-ipv6 doesn't accept the '
vpn_gateway' keyword and therefore I can't easily set a metric. I could indeed put the actual server IP in there but that's less flexible, partly because I have this routes section in a separate file included in multiple configs on the same machine.What are you trying to achieve?
I'm trying to set a metric for IPv6 route pushed from the OpenVPN server.
Quoted 8 lines
Long story, if you're asking why, is: we've got multiple OpenVPN gateways to our network, each in a different location. A VPN user can connect to any of them, or to more then one, and must have access to the whole network. Obviously I'm pushing the prefixes local for each location with a lower metric and the non-local prefixes with a higher metric. That way, even if a user has a tunnel up to two or more locations, the traffic to each location is always routed through the most direct tunnel with the lowest metric.
OK, this makes sense, and is a good argument for metric.
(And to make this extensible, it would need to understand a gateway parameter, which it currently doesn't).
Quoted 7 lines
To make things a little more complicated I have both UDP and TCP endpoints in each location (TCP is there for users behind HTTP proxies for example) and most of their configs are shared, therefore I use the "
vpn_gateway" placeholder that gets replaced for the VPN IP of the actual server, which is different between UDP and TCP on the same gateway. Without that placeholder I can't share the config with "push route-ipv6" options between UDP and TCP instances.
It won't work anyway right now, because metric isn't handled in IPv6 routing at all - classical case of "other things were more pressing" (and all this stuff is "slightly" system-dependent, so needs lots of testing...).
Quoted 1 line
So that's what I'm trying to achieve. Hope that makes sense :)
It does. Thanks for explaining.
I'm not promising anything, but it just moved a bit further up on my TODO list... ;-)
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...Hi,
Quoted 6 lines · Michal Ludvig
I'm used to pushing route options to the clients with explicit metrics. That works good for IPv4 with e.g.:
push "route 192.168.128.0 255.255.240.0vpn_gateway200"However route-ipv6 doesn't accept the '
vpn_gateway' keyword and therefore I can't easily set a metric.
If all your clients are Linux or Windows, you can "sort of" do that today already with 'push "route-ipv6"', specifying an arbitrary (but valid) IPv6 address as gateway address:
push "route-ipv6 2001:db8::/48 2001::1 200"
This is a side effect of the way we currently install IPv6 routes on platforms that can do "route to interface" - the route always points to the "tun" interface, and the gateway spec is not used.
"metric" for IPv6 routes is currently implemented and tested on Linux, but not on any other platform yet.
What client platforms do you need this for?
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...