summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2023-11-12 14:50:13 +0000
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2023-11-14 16:57:26 +0000
commitca7ad9cbdfe748ff7d048faaea2297a591f64b5c (patch)
treea9b2387377caf76a8493c891d02df6b8ba762455 /data
parent527928154c91693c9c21a17a3d609ce17cba9675 (diff)
downloadvyos-1x-ca7ad9cbdfe748ff7d048faaea2297a591f64b5c.tar.gz
vyos-1x-ca7ad9cbdfe748ff7d048faaea2297a591f64b5c.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 (cherry picked from commit 480711c329a38b773bb0b8f64f0e50dfc4ea4437)
Diffstat (limited to 'data')
-rw-r--r--data/templates/openvpn/server.conf.j22
1 files changed, 1 insertions, 1 deletions
diff --git a/data/templates/openvpn/server.conf.j2 b/data/templates/openvpn/server.conf.j2
index f76fbbe79..d7d4a5861 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 }} nopool
{% 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 %}