diff --git a/scripts/installer.sh b/scripts/installer.sh index 22c1efe2e..eb49425fc 100755 --- a/scripts/installer.sh +++ b/scripts/installer.sh @@ -51,6 +51,13 @@ if ! id "${USER}" 2>/dev/null; then fi if [[ "${is_update}" == "yes" ]]; then + # This is here, since the splash screen needs this file to be present :-( + readonly DATA_DIR="/home/${USER}/data" + if [[ ! -f "${DATA_DIR}/nginx/cert/dhparams.pem" ]]; then + mkdir -p "${DATA_DIR}/nginx/cert/" + openssl dhparam -out "${DATA_DIR}/nginx/cert/dhparams.pem" 2048 + fi + echo "Setting up update splash screen" "${box_src_tmp_dir}/setup/splashpage.sh" --data "${arg_data}" # show splash from new code ${BOX_SRC_DIR}/setup/stop.sh # stop the old code diff --git a/setup/start/nginx/appconfig.ejs b/setup/start/nginx/appconfig.ejs index 2b76e306c..002a5eaa2 100644 --- a/setup/start/nginx/appconfig.ejs +++ b/setup/start/nginx/appconfig.ejs @@ -25,7 +25,9 @@ server { # https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html ssl_prefer_server_ciphers on; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # don't use SSLv3 ref: POODLE - ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; + # ciphers according to https://weakdh.org/sysadmin.html + ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA'; + ssl_dhparam /home/yellowtent/data/nginx/cert/dhparams.pem; add_header Strict-Transport-Security "max-age=15768000"; # https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options