Add auth-nocache. Set cipher to BF-CBC if no is specified.

This commit is contained in:
Christoph 2018-07-02 12:46:27 +02:00
parent da6749458e
commit b5ba1301d8
2 changed files with 39 additions and 1 deletions

View File

@ -523,6 +523,10 @@ if [[ -n "$SERVER_CIPHER" ]]; then
cat <<EOF >> "$_client_conf_file" 2>> "$log_file"
cipher $SERVER_CIPHER
EOF
else
cat <<EOF >> "$_client_conf_file" 2>> "$log_file"
cipher BF-CBC
EOF
fi
cat <<EOF >> "$_client_conf_file" 2>> "$log_file"
@ -541,6 +545,21 @@ fi
cat <<EOF >> ${_client_conf_file} 2>> "$log_file"
# --auth-nocache
#
# Don't cache --askpass or --auth-user-pass username/passwords in
# virtual memory.
# If specified, this directive will cause OpenVPN to immediately forget
# username/password inputs after they are used. As a result, when OpenVPN
# needs a username/password, it will prompt for input from stdin, which may
# be multiple times during the duration of an OpenVPN session.
#
# When using --auth-nocache in combination with a user/password file
# and --chroot or --daemon, make sure to use an absolute path.
#
#
auth-nocache
# Verbosity level.
# 0 -- quiet except for fatal errors.
# 1 -- mostly quiet, but display non-fatal network errors.

View File

@ -179,7 +179,7 @@ else
fi
[[ "${SERVER_CIPHER,,}" = "none" ]] && SERVER_CIPHER=""
[[ "${SERVER_CIPHER,,}" = "none" ]] && SERVER_CIPHER="BF-CBC"
if [[ -z "$LZO_COMPRESSION" ]]; then
LZO_COMPRESSION=true
elif $LZO_COMPRESSION ; then
@ -505,6 +505,10 @@ if [[ -n "$SERVER_CIPHER" ]]; then
cat <<EOF >> "$_client_conf_file" 2>> "$log_file"
cipher $SERVER_CIPHER
EOF
else
cat <<EOF >> "$_client_conf_file" 2>> "$log_file"
cipher BF-CBC
EOF
fi
cat <<EOF >> "$_client_conf_file" 2>> "$log_file"
@ -523,6 +527,21 @@ fi
cat <<EOF >> ${_client_conf_file} 2>> "$log_file"
# --auth-nocache
#
# Don't cache --askpass or --auth-user-pass username/passwords in
# virtual memory.
# If specified, this directive will cause OpenVPN to immediately forget
# username/password inputs after they are used. As a result, when OpenVPN
# needs a username/password, it will prompt for input from stdin, which may
# be multiple times during the duration of an OpenVPN session.
#
# When using --auth-nocache in combination with a user/password file
# and --chroot or --daemon, make sure to use an absolute path.
#
#
auth-nocache
# Verbosity level.
# 0 -- quiet except for fatal errors.
# 1 -- mostly quiet, but display non-fatal network errors.