diff options
| author | Nataliia Solomko <natalirs1985@gmail.com> | 2026-11-02 19:01:34 +0200 |
|---|---|---|
| committer | Nataliia Solomko <natalirs1985@gmail.com> | 2026-11-02 19:35:52 +0200 |
| commit | 432fa1807de6f71c76cbcada4d295b4773ca59ab (patch) | |
| tree | 962788a556b6a47e457b1211f8948cd1f10a09e1 /data | |
| parent | ded66339096464636f4c5910c010c637184d1a3e (diff) | |
| download | vyos-1x-432fa1807de6f71c76cbcada4d295b4773ca59ab.tar.gz vyos-1x-432fa1807de6f71c76cbcada4d295b4773ca59ab.zip | |
openvpn: T9560: Render tls-auth in site-to-site mode
In site-to-site mode "tls auth-key" was accepted but never used. The key
direction is now taken from "tls role": active uses 1, passive uses 0.
A raw "openvpn-option --tls-auth" in site-to-site mode, the only way to
use the key until now, is left as it is: no tls-auth is rendered next to
it, so existing tunnels keep working.
Diffstat (limited to 'data')
| -rw-r--r-- | data/templates/openvpn/server.conf.j2 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/data/templates/openvpn/server.conf.j2 b/data/templates/openvpn/server.conf.j2 index 729ab7a80..fcb6932cb 100644 --- a/data/templates/openvpn/server.conf.j2 +++ b/data/templates/openvpn/server.conf.j2 @@ -200,6 +200,12 @@ dh none tls-auth /run/openvpn/{{ ifname }}_auth.key 1 {% elif mode == 'server' %} tls-auth /run/openvpn/{{ ifname }}_auth.key 0 +{% elif mode == 'site-to-site' and raw_tls_auth is not vyos_defined %} +{% if tls.role is vyos_defined('active') %} +tls-auth /run/openvpn/{{ ifname }}_auth.key 1 +{% elif tls.role is vyos_defined('passive') %} +tls-auth /run/openvpn/{{ ifname }}_auth.key 0 +{% endif %} {% endif %} {% endif %} {% if tls.role is vyos_defined('active') %} |
