summaryrefslogtreecommitdiff
path: root/data/templates/openvpn/server.conf.j2
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-08-20 07:24:55 +0200
committerGitHub <noreply@github.com>2024-08-20 07:24:55 +0200
commit2277371fe18577502ce318c23789f86d1ec97be7 (patch)
tree44dfcee280ad6d46e858ef0af266755d70bb066a /data/templates/openvpn/server.conf.j2
parent538930c27a0984cd9f9a58115e6ea6395002707e (diff)
parent18ea3673a105d9d12699afb2607c81412dde441b (diff)
downloadvyos-1x-2277371fe18577502ce318c23789f86d1ec97be7.tar.gz
vyos-1x-2277371fe18577502ce318c23789f86d1ec97be7.zip
Merge pull request #3975 from lucasec/t6183
T6183: interfaces openvpn: suppport specifying IP protocol version
Diffstat (limited to 'data/templates/openvpn/server.conf.j2')
-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 }}