diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-11-12 14:50:13 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-11-12 14:50:13 +0000 |
commit | 480711c329a38b773bb0b8f64f0e50dfc4ea4437 (patch) | |
tree | d435d15636187dd9c0699417714b09a76aa04bee /data/templates/openvpn | |
parent | 2e587c8329a1d32fc1ec601c7753211d0fedbf2c (diff) | |
download | vyos-1x-480711c329a38b773bb0b8f64f0e50dfc4ea4437.tar.gz vyos-1x-480711c329a38b773bb0b8f64f0e50dfc4ea4437.zip |
T5728: OpenVPN server replace first_host_address to vpn_gateway
Some OpenVPN clients (OpenVPN3) do not understand address of
gateway for the pushed networks. It leads that pushed routes are
not installed at all.
Replace `subnet | first_host_address` to the `vpn_gateway` to fix it
Diffstat (limited to 'data/templates/openvpn')
-rw-r--r-- | data/templates/openvpn/server.conf.j2 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/data/templates/openvpn/server.conf.j2 b/data/templates/openvpn/server.conf.j2 index 746155c37..c02411904 100644 --- a/data/templates/openvpn/server.conf.j2 +++ b/data/templates/openvpn/server.conf.j2 @@ -79,7 +79,7 @@ server {{ subnet | address_from_cidr }} {{ subnet | netmask_from_cidr }} {{ 'nop {% if server.push_route is vyos_defined %} {% for route, route_config in server.push_route.items() %} {% if route | is_ipv4 %} -push "route {{ route | address_from_cidr }} {{ route | netmask_from_cidr }} {{ subnet | first_host_address ~ ' ' ~ route_config.metric if route_config.metric is vyos_defined }}" +push "route {{ route | address_from_cidr }} {{ route | netmask_from_cidr }} {{ 'vpn_gateway' ~ ' ' ~ route_config.metric if route_config.metric is vyos_defined }}" {% elif route | is_ipv6 %} push "route-ipv6 {{ route }}" {% endif %} |