10-ssl.conf
· 218 B · Text
Raw
# this is a dovecot config snippet, inclide me into /etc/dovecot/local.conf
# SSL protocols to use
ssl_protocols = !SSLv2 !SSLv3
# for checking that service
openssl s_client -connect <hostname>:143 -starttls imap -ssl3
| 1 | # this is a dovecot config snippet, inclide me into /etc/dovecot/local.conf |
| 2 | # SSL protocols to use |
| 3 | ssl_protocols = !SSLv2 !SSLv3 |
| 4 | # for checking that service |
| 5 | openssl s_client -connect <hostname>:143 -starttls imap -ssl3 |
fix_apache2.sh
· 539 B · Bash
Raw
#!/bin/sh
#if [ "$(netstat -tapn | grep 'apache2' | awk {'print $7'} | sed 's#^[0-9]*/##' | tail -1 )" = "apache2" ]; then
if [ "$(netstat -tapn | grep 'apache2' | awk {'print $7'} | sed 's#^[0-9]*/##' | tail -1 )" = "apache2" ]; then
if ! [ -f /etc/apache2/conf.d/x_disable_SSLv3.conf ]; then
cat <<EOF >> /etc/apache2/conf.d/x_disable_SSLv3.conf
<IfModule mod_ssl.c>
SSLProtocol all -SSLv2 -SSLv3
</IfModule>
EOF
/etc/init.d/apache2 restart
fi
fi
exit 0
# for checking that service
testssl.sh --poodle <vHost> | grep POODLE
| 1 | #!/bin/sh |
| 2 | #if [ "$(netstat -tapn | grep 'apache2' | awk {'print $7'} | sed 's#^[0-9]*/##' | tail -1 )" = "apache2" ]; then |
| 3 | if [ "$(netstat -tapn | grep 'apache2' | awk {'print $7'} | sed 's#^[0-9]*/##' | tail -1 )" = "apache2" ]; then |
| 4 | if ! [ -f /etc/apache2/conf.d/x_disable_SSLv3.conf ]; then |
| 5 | cat <<EOF >> /etc/apache2/conf.d/x_disable_SSLv3.conf |
| 6 | <IfModule mod_ssl.c> |
| 7 | SSLProtocol all -SSLv2 -SSLv3 |
| 8 | </IfModule> |
| 9 | EOF |
| 10 | /etc/init.d/apache2 restart |
| 11 | fi |
| 12 | fi |
| 13 | exit 0 |
| 14 | # for checking that service |
| 15 | testssl.sh --poodle <vHost> | grep POODLE |
fix_apache2_strong.sh
· 912 B · Bash
Raw
#!/bin/sh
if [ "$(netstat -tapn | grep 'apache2' | awk {'print $7'} | sed 's#^[0-9]*/##' | tail -1 )" = "apache2" ]; then
if ! [ -f /etc/apache2/conf.d/x_strong_cipherlist.conf ]; then
cat <<EOF >> /etc/apache2/conf.d/x_strong_cipherlist.conf
<IfModule mod_ssl.c>
SSLCipherSuite AES256+EECDH:AES256+EDH
SSLProtocol All -SSLv2 -SSLv3
SSLHonorCipherOrder On
<IfVersion >= 2.4>
SSLCompression off # Requires Apache >= 2.4
SSLUseStapling on # Requires Apache >= 2.4
SSLStaplingCache "shmcb:logs/stapling-cache(150000)" # Requires >= Apache 2.4
</IfVersion>
</IfModule>
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"
Header always set X-Frame-Options DENY
Header always set X-Content-Type-Options nosniff
</IfModule>
EOF
/etc/init.d/apache2 restart
fi
fi
exit 0
# for checking that service
testssl.sh --poodle <vHost> | grep POODLE
| 1 | #!/bin/sh |
| 2 | if [ "$(netstat -tapn | grep 'apache2' | awk {'print $7'} | sed 's#^[0-9]*/##' | tail -1 )" = "apache2" ]; then |
| 3 | if ! [ -f /etc/apache2/conf.d/x_strong_cipherlist.conf ]; then |
| 4 | cat <<EOF >> /etc/apache2/conf.d/x_strong_cipherlist.conf |
| 5 | <IfModule mod_ssl.c> |
| 6 | SSLCipherSuite AES256+EECDH:AES256+EDH |
| 7 | SSLProtocol All -SSLv2 -SSLv3 |
| 8 | SSLHonorCipherOrder On |
| 9 | <IfVersion >= 2.4> |
| 10 | SSLCompression off # Requires Apache >= 2.4 |
| 11 | SSLUseStapling on # Requires Apache >= 2.4 |
| 12 | SSLStaplingCache "shmcb:logs/stapling-cache(150000)" # Requires >= Apache 2.4 |
| 13 | </IfVersion> |
| 14 | </IfModule> |
| 15 | <IfModule mod_headers.c> |
| 16 | Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains" |
| 17 | Header always set X-Frame-Options DENY |
| 18 | Header always set X-Content-Type-Options nosniff |
| 19 | </IfModule> |
| 20 | EOF |
| 21 | /etc/init.d/apache2 restart |
| 22 | fi |
| 23 | fi |
| 24 | exit 0 |
| 25 | # for checking that service |
| 26 | testssl.sh --poodle <vHost> | grep POODLE |
haproxy.conf
· 198 B · Text
Raw
# this is a haproxy config snippet, include me into /etc/haproxy/haproxy.conf
bind :443 ssl crt <crt> ciphers <ciphers> no-sslv3
# for checking that service
testssl.sh --poodle <vHost> | grep POODLE
| 1 | # this is a haproxy config snippet, include me into /etc/haproxy/haproxy.conf |
| 2 | bind :443 ssl crt <crt> ciphers <ciphers> no-sslv3 |
| 3 | # for checking that service |
| 4 | testssl.sh --poodle <vHost> | grep POODLE |
| 1 | # this is a courier-imapd config, include me into /etc/courier/imapd-ssl |
| 2 | # ensure that all SSL* variants are removed |
| 3 | TLS_PROTOCOL=TLS1 |
| 4 | # for checking that service |
| 5 | nmap --script ssl-enum-ciphers -p 993 <hostname> | grep SSLv |
main.cf
· 315 B · CFEngine3
Raw
# this is a postfix config snippet, include me into /etc/postfix/main.cf
smtp_tls_protocols=!SSLv2,!SSLv3
smtp_tls_mandatory_protocols=!SSLv2,!SSLv3
smtpd_tls_protocols=!SSLv2,!SSLv3
smtpd_tls_mandatory_protocols=!SSLv2,!SSLv3
# for checking that service
openssl s_client -connect <hostname>:25 -starttls smtp -ssl3
| 1 | # this is a postfix config snippet, include me into /etc/postfix/main.cf |
| 2 | smtp_tls_protocols=!SSLv2,!SSLv3 |
| 3 | smtp_tls_mandatory_protocols=!SSLv2,!SSLv3 |
| 4 | smtpd_tls_protocols=!SSLv2,!SSLv3 |
| 5 | smtpd_tls_mandatory_protocols=!SSLv2,!SSLv3 |
| 6 | # for checking that service |
| 7 | openssl s_client -connect <hostname>:25 -starttls smtp -ssl3 |
| 1 | # this is a nginx config snippet, put me into /etc/nginx/conf.d |
| 2 | ssl_session_cache shared:SSL:10m; |
| 3 | ssl_session_timeout 10m; |
| 4 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |
| 5 | # for checking that service |
| 6 | testssl.sh --poodle <vHost> | grep POODLE |
ssl_strong.conf
· 605 B · Text
Raw
# this is a nginx config snippet, put me into /etc/nginx/conf.d
ssl_ciphers "AES256+EECDH:AES256+EDH";
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains";
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
ssl_stapling on; # Requires nginx >= 1.3.7
ssl_stapling_verify on; # Requires nginx => 1.3.7
resolver $DNS-IP-1 $DNS-IP-2 valid=300s;
resolver_timeout 5s;
# for checking that service
testssl.sh --poodle <vHost> | grep POODLE
| 1 | # this is a nginx config snippet, put me into /etc/nginx/conf.d |
| 2 | ssl_ciphers "AES256+EECDH:AES256+EDH"; |
| 3 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |
| 4 | ssl_prefer_server_ciphers on; |
| 5 | ssl_session_cache shared:SSL:10m; |
| 6 | ssl_session_timeout 10m; |
| 7 | add_header Strict-Transport-Security "max-age=63072000; includeSubDomains"; |
| 8 | add_header X-Frame-Options DENY; |
| 9 | add_header X-Content-Type-Options nosniff; |
| 10 | ssl_stapling on; # Requires nginx >= 1.3.7 |
| 11 | ssl_stapling_verify on; # Requires nginx => 1.3.7 |
| 12 | resolver $DNS-IP-1 $DNS-IP-2 valid=300s; |
| 13 | resolver_timeout 5s; |
| 14 | # for checking that service |
| 15 | testssl.sh --poodle <vHost> | grep POODLE |