Page MenuHomeVyOS Platform

Allow OpenVPN servers to push routes with custom metric values
Closed, ResolvedPublicFEATURE REQUEST

Description

Current syntax only allows setting network/IP

set interfaces openvpn vtun0 server push-route x.x.x.x/x

It should also support optional arguments (e. g. metric) as specified in the openvpn man page

--route network/IP [netmask] [gateway] [metric]

Details

Difficulty level
Normal (likely a few hours)
Version
1.2
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Improvement (missing useful functionality)

Event Timeline

This would make sense. Some could imagine that there is a P2P linkt between two sites and a WAN IPSec Backup link

syncer triaged this task as Wishlist priority.Jun 24 2018, 1:23 AM

I guess this is best done along with openvpn scripts rewrite.

zsdc changed Difficulty level from Unknown (require assessment) to Normal (likely a few hours).Mar 11 2021, 2:22 PM
zsdc set Is it a breaking change? to Unspecified (possibly destroys the router).
Viacheslav changed the subtype of this task from "Bug" to "Feature Request".

PR for current https://github.com/vyos/vyos-1x/pull/974

Server site:

set interfaces openvpn vtun10 server push-route 100.64.60.0/24 metric '10'

Client site:

[email protected]:~$ show ip route 100.64.60.0/24
Routing entry for 100.64.60.0/24
  Known via "kernel", distance 0, metric 10, best
  Last update 00:04:50 ago
  * 10.10.0.1, via vtun10

@darkdragon-001 It will be available in the next rolling release, can you test it?

Viacheslav changed the task status from Open to Needs testing.Aug 17 2021, 7:34 AM
dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.Sep 3 2021, 12:01 PM
dmbaturin set Issue type to Improvement (missing useful functionality).
dmbaturin renamed this task from openvpn push-route allow different metric to Allow OpenVPN servers to push routes with custom metric values.Sep 10 2021, 6:12 AM

Not all clients support the gateway option (get issues in mac and windows):
Mac

tun_prop_route_error: route destinations other than vpn_gateway or net_gateway are not supported
Viacheslav changed the task status from Open to Needs testing.Sep 27 2021, 6:05 PM