Add username-as-common-name if the certificate authentication is not enabled.

This commit is contained in:
Andrea Dell'Amico 2020-06-23 13:58:05 +02:00
parent ae1b190337
commit 2999d5ae8d
1 changed files with 1 additions and 2 deletions

View File

@ -40,9 +40,7 @@ compress lz4-v2
push "compress lz4-v2"
{% endif %}
keepalive {{ openvpn_keepalive }}
{% if openvpn_cert_auth_enabled %}
tls-server
{% endif %}
tls-auth {{ openvpn_tls_auth }} 0
key-direction 0
dh {{ openvpn_dh }}
@ -52,6 +50,7 @@ key {{ openvpn_key }}
{% if not openvpn_cert_auth_enabled %}
# Disable cert-auth
client-cert-not-required
username-as-common-name
{% endif %}
{% if openvpn_username_pam_auth %}
username-as-common-name