1

I am using SSL Certificate issued by Go Daddy. On my Linux Instance following are the software details :-

  • Apache Version - Apache/2.4.16 (Amazon)
  • Openssl Version - OpenSSL 1.0.1k-fips 8 Jan 2015
  • mod_ssl version - mod_ssl-2.4.2

Note :- I install Apache from RPM Package and later I install mod_ssl and openssl from rpm package.

1) The problem is when I disable SSLv3 and test SSL Server from https://www.ssllabs.com/ssltest/ it gives me warning that "this server does not support TLSv1.2 which is current best" and when I enable TLSv1.2 protocol the same test warns me about "This server supports SSLv3 protocol and vulnerable to Poodle attack" How to disable SSLv3 and enable TLSv1.2 at same time on server? Current configuration of my Vhost file about SSL is:

SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite 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
SSLHonorCipherOrder     on

2) I cannot create a Strong Diffie-Hellman Group. Current is 1024-bit Diffie-Hellman group and want to create 2048-bit group for the site. I issue this command to generate 2048-bit key:-

openssl dhparam -out dhparams.pem 2048

and my configuration in VHost is:

SSLOpenSSLConfCmd DHParameters /etc/httpd/dhparams.pem

when I restart server error message pop up:

Invalid command 'SSLOpenSSLConfCmd', perhaps misspelled or defined by a module not included in the server configuration

How to resolve this issue?

Output of command openssl s_client -connect 127.0.0.1:443 -tls1_2 -msg when SSLv3 is enabled :-

CONNECTED(00000003)
>>> ??? [length 0005]

>>> TLS 1.2 Handshake [length 0138], ClientHello

<<< ??? [length 0005]

<<< TLS 1.2 Handshake [length 003a], ServerHello

<<< ??? [length 0005]

<<< TLS 1.2 Handshake [length 12a7], Certificate

depth=3 C = US, O = "The Go Daddy Group, Inc.", OU = Go Daddy Class 2     
Certification Authority
verify error:num=19:self signed certificate in certificate chain
<<< ??? [length 0005]

<<< TLS 1.2 Handshake [length 020f], ServerKeyExchange

<<< ??? [length 0005]

<<< TLS 1.2 Handshake [length 0004], ServerHelloDone

>>> ??? [length 0005]

>>> TLS 1.2 Handshake [length 0086], ClientKeyExchange

>>> ??? [length 0005]

>>> TLS 1.2 ChangeCipherSpec [length 0001]

>>> ??? [length 0005]

>>> TLS 1.2 Handshake [length 0010], Finished

<<< ??? [length 0005]

<<< TLS 1.2 Handshake [length 00ca]???

<<< ??? [length 0005]

<<< TLS 1.2 ChangeCipherSpec [length 0001]

<<< ??? [length 0005]

<<< TLS 1.2 Handshake [length 0010], Finished

output of command openssl s_client -connect 127.0.0.1:443 -ssl3 -msg with SSLv3 disabled :-

>>> ??? [length 0005]

>>> SSL 3.0 Handshake [length 0099], ClientHello

<<< ??? [length 0005]

<<< SSL 3.0 Alert [length 0002], fatal handshake_failure

Output of command openssl s_client -connect 127.0.0.1:443 -tls1_2 -msg when SSLv3 is disabled :-

CONNECTED(00000003)
>>> ??? [length 0005]

>>> TLS 1.2 Handshake [length 0138], ClientHello

<<< ??? [length 0005]

>>> ??? [length 0005]

>>> TLS 1.0 Alert [length 0002], fatal protocol_version

SSL Debug Error Logs in Apache for command openssl s_client -connect 127.0.0.1:443 -tls1_2 -msg when SSLv3 is disabled :-

[Tue Nov 24 07:50:13.019993 2015] [ssl:info] [pid 6419] [client 127.0.0.1:32836] AH01964: Connection to child 2 established (server site1.example.com:443)
[Tue Nov 24 07:50:13.023693 2015] [ssl:info] [pid 6419] [client 127.0.0.1:32836] AH02008: SSL library error 1 in handshake (server site1.example.com:443)
[Tue Nov 24 07:50:13.023752 2015] [ssl:info] [pid 6419] SSL Library Error: error:1409442E:SSL routines:SSL3_READ_BYTES:tlsv1 alert protocol version (SSL alert number 70)
[Tue Nov 24 07:50:13.023789 2015] [ssl:info] [pid 6419] [client 127.0.0.1:32836] AH01998: Connection closed to child 2 with abortive shutdown (server site1.example.com:443)
  • 1
    instead of all, try SSLProtocol +TLSv1 +TLSv1.1 +TLSv1.2 -SSLv3 -SSLv2 – Andrew Domaszek Dec 19 '15 at 10:09
  • SSLProtocol -all +TLSv1 +TLSv1.1 +TLSv1.2 gives me error when restarting apache. SSLProtocol: Illegal protocol 'TLSv1.1' – Syd.Vigilant Dec 21 '15 at 6:28
  • Try a different Linux distribution. It appears that Amazon hasn't built Apache or OpenSSL correctly on your Amazon Linux. – Michael Hampton Dec 23 '15 at 19:37
  • Single instance or are you using a load balancer as well? – Matt Dec 23 '15 at 19:43
  • @Matt I am using single instance. – Syd.Vigilant Dec 24 '15 at 4:40
2

This is the configuration to get the most compatible and secure https, tested on ssllabs (requier openssl uptodate):

#=========================#
# [ HTTPS CONFIGURATION ] #
#=========================#
SSLEngine on
SSLOptions +StrictRequire
SSLProxyEngine on

# Prevent Beast attack
SSLHonorCipherOrder on

# SSL Compression (CRIME attack)
SSLCompression off

# HSTS
Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"

# PROTOCOL
SSLProtocol -all +TLSv1 +TLSv1.1 +TLSv1.2
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4

# KEY
SSLCertificateFile /opt/web/ssl/xx.crt
SSLCertificateKeyFile /opt/web/ssl/xxx.key
SSLCertificateChainFile /opt/web/ssl/xxx.pem

# Deny HTTP request when SSL is used
<Directory />
    SSLRequireSSL
</Directory>

AddType application/x-x509-ca-cert      .crt
AddType application/x-pkcs7-crl         .crl
  • SSLProtocol -all +TLSv1 +TLSv1.1 +TLSv1.2 gives me error when restarting apache. SSLProtocol: Illegal protocol 'TLSv1.1' – Syd.Vigilant Dec 21 '15 at 6:28
  • What AMI are you based off? You could consider switching to nginx. Unless you really apache or use PHP or are tightly integrated somehow. – Matt Dec 23 '15 at 19:45
  • @Matt I am using Amazon Linux AMI 2015.09.1 (HVM), SSD Volume Type - ami-60b6c60a AMI for my Instance. And I have to use apache only. – Syd.Vigilant Dec 24 '15 at 10:08
0

Use the Mozilla Configuration Generator (https://mozilla.github.io/server-side-tls/ssl-config-generator/) to generate a template for your configuration file. Be sure to enter your exact Apache and OpenSSL versions in the given fields and select the "modern" setting to utilize the most secure protocols.

That being said, your second issue with "SSLOpenSSLConfCmd" is related to the version of OpenSSL that you are using. To utilize that command you will need both Apache > 2.4.8 and OpenSSL > 1.0.2. So, upgrade your OpenSSL.

As for the first issue regarding TLSv1.2 and SSLv3, that comes down to the SSLCipherSuite list that you have enabled. Use OpenSSL to verify which suites work with which protocols and remove the weaker ones from your list (or use the aforementioned configuration generator). eg:

openssl ciphers -s -v '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'

Which results in the following list:

    DHE-DSS-AES256-GCM-SHA384 TLSv1.2 Kx=DH       Au=DSS  Enc=AESGCM(256) Mac=AEAD
    DHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=DH       Au=RSA  Enc=AESGCM(256) Mac=AEAD
    DHE-DSS-AES128-GCM-SHA256 TLSv1.2 Kx=DH       Au=DSS  Enc=AESGCM(128) Mac=AEAD
    DHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=DH       Au=RSA  Enc=AESGCM(128) Mac=AEAD
    ECDHE-RSA-AES128-SHA256 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AES(128)  Mac=SHA256
    ECDHE-ECDSA-AES128-SHA256 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=AES(128)  Mac=SHA256
    DHE-RSA-AES128-SHA256   TLSv1.2 Kx=DH       Au=RSA  Enc=AES(128)  Mac=SHA256
    DHE-DSS-AES128-SHA256   TLSv1.2 Kx=DH       Au=DSS  Enc=AES(128)  Mac=SHA256
    AES128-SHA256           TLSv1.2 Kx=RSA      Au=RSA  Enc=AES(128)  Mac=SHA256
    DHE-RSA-AES256-SHA256   TLSv1.2 Kx=DH       Au=RSA  Enc=AES(256)  Mac=SHA256
    DHE-DSS-AES256-SHA256   TLSv1.2 Kx=DH       Au=DSS  Enc=AES(256)  Mac=SHA256
    AES256-SHA256           TLSv1.2 Kx=RSA      Au=RSA  Enc=AES(256)  Mac=SHA256
    ECDHE-RSA-AES128-SHA    SSLv3 Kx=ECDH     Au=RSA  Enc=AES(128)  Mac=SHA1
    ECDHE-ECDSA-AES128-SHA  SSLv3 Kx=ECDH     Au=ECDSA Enc=AES(128)  Mac=SHA1
    DHE-RSA-AES128-SHA      SSLv3 Kx=DH       Au=RSA  Enc=AES(128)  Mac=SHA1
    DHE-DSS-AES128-SHA      SSLv3 Kx=DH       Au=DSS  Enc=AES(128)  Mac=SHA1
    AES128-SHA              SSLv3 Kx=RSA      Au=RSA  Enc=AES(128)  Mac=SHA1
    ECDHE-RSA-AES256-SHA    SSLv3 Kx=ECDH     Au=RSA  Enc=AES(256)  Mac=SHA1
    ECDHE-ECDSA-AES256-SHA  SSLv3 Kx=ECDH     Au=ECDSA Enc=AES(256)  Mac=SHA1
    DHE-RSA-AES256-SHA      SSLv3 Kx=DH       Au=RSA  Enc=AES(256)  Mac=SHA1
    DHE-DSS-AES256-SHA      SSLv3 Kx=DH       Au=DSS  Enc=AES(256)  Mac=SHA1
    AES256-SHA      SSLv3 Kx=RSA      Au=RSA  Enc=AES(256)  Mac=SHA1
    ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AESGCM(256) Mac=AEAD
    ECDHE-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH     Au=ECDSA 
    Enc=AESGCM(256) Mac=AEAD
    ECDHE-RSA-AES256-SHA384 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AES(256)  Mac=SHA384
    ECDHE-ECDSA-AES256-SHA384 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=AES(256)  Mac=SHA384
    AES256-GCM-SHA384       TLSv1.2 Kx=RSA      Au=RSA  Enc=AESGCM(256) Mac=AEAD
    ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AESGCM(128) Mac=AEAD
    ECDHE-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=AESGCM(128) Mac=AEAD
    AES128-GCM-SHA256       TLSv1.2 Kx=RSA      Au=RSA  Enc=AESGCM(128) Mac=AEAD
    DHE-RSA-CAMELLIA256-SHA SSLv3 Kx=DH       Au=RSA  Enc=Camellia(256) Mac=SHA1
    DHE-DSS-CAMELLIA256-SHA SSLv3 Kx=DH       Au=DSS  Enc=Camellia(256) Mac=SHA1
    CAMELLIA256-SHA         SSLv3 Kx=RSA      Au=RSA  Enc=Camellia(256) Mac=SHA1
    DHE-RSA-CAMELLIA128-SHA SSLv3 Kx=DH       Au=RSA  Enc=Camellia(128) Mac=SHA1
    DHE-DSS-CAMELLIA128-SHA SSLv3 Kx=DH       Au=DSS  Enc=Camellia(128) Mac=SHA1
    CAMELLIA128-SHA SSLv3 Kx=RSA      Au=RSA  Enc=Camellia(128) Mac=SHA1

Remove the SSLv3 ciphers to correct that issue.

  • Thanks @Madcarrots for your reply. I checked with the above openssl ciphers -s -v command but i don't think I can remove all the sslv3 ciphers. There are some ciphers which are used by both the protocols SSLv3 and TLSv1.2. – Syd.Vigilant Dec 24 '15 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.