summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorLucas Christian <lucas@lucasec.com>2024-08-11 23:06:02 -0700
committerLucas Christian <lucas@lucasec.com>2024-08-13 21:47:05 -0700
commit18ea3673a105d9d12699afb2607c81412dde441b (patch)
treecf8692ab9414d777b16819348ec6ccababc27c0c /data
parente229d7498cc77298c79af9811a742f3ad54edf4c (diff)
downloadvyos-1x-18ea3673a105d9d12699afb2607c81412dde441b.tar.gz
vyos-1x-18ea3673a105d9d12699afb2607c81412dde441b.zip
T6183: interfaces openvpn: suppport specifying IP protocol version
Diffstat (limited to 'data')
-rw-r--r--data/templates/openvpn/server.conf.j212
1 files changed, 9 insertions, 3 deletions
diff --git a/data/templates/openvpn/server.conf.j2 b/data/templates/openvpn/server.conf.j2
index 408103558..be811f45e 100644
--- a/data/templates/openvpn/server.conf.j2
+++ b/data/templates/openvpn/server.conf.j2
@@ -11,11 +11,11 @@ dev-type {{ device_type }}
dev {{ ifname }}
persist-key
{% if protocol is vyos_defined('tcp-active') %}
-proto tcp-client
+proto tcp{{ protocol_modifier }}-client
{% elif protocol is vyos_defined('tcp-passive') %}
-proto tcp-server
+proto tcp{{ protocol_modifier }}-server
{% else %}
-proto udp
+proto udp{{ protocol_modifier }}
{% endif %}
{% if local_host is vyos_defined %}
local {{ local_host }}
@@ -63,6 +63,9 @@ nobind
#
# OpenVPN Server mode
#
+{% if ip_version is vyos_defined('ipv6') %}
+bind ipv6only
+{% endif %}
mode server
tls-server
{% if server is vyos_defined %}
@@ -131,6 +134,9 @@ plugin "{{ plugin_dir }}/openvpn-otp.so" "otp_secrets=/config/auth/openvpn/{{ if
#
# OpenVPN site-2-site mode
#
+{% if ip_version is vyos_defined('ipv6') %}
+bind ipv6only
+{% endif %}
ping {{ keep_alive.interval }}
ping-restart {{ keep_alive.failure_count }}