Ssl – Disable cipher suite or change priority in apache based on IP address

apache-2.4mod-sslssl

I have run into an issue where I need to disable DH cipher suites or change the cipher suite priority only to certain IP addresses in Apache 2.4.7.

Reason being is that a system running on JDK7 needs to connect to my web service which requires DH keys to be 1024-bit. Lowering DH key size is not an option as I don't want to open us up to the logjam vulnerability.

Ideally I would like to prioritize AES256-SHA or disable EC cipher suites only in Apache 2.4.7 when serving requests to certain IP addresses.

Thank you.

Best Answer

The SSLCipherSuite directive can be used in the Server, VirtualHost, Directory, and even .htaccess contexts. This means that you can set up a separate virtualhost listening on another port, a separate directory ("example.com/JDK7Access"), or even an .htaccess file to allow a different cipher suite at your desired level.

Source: Apache 2.4 module mod_ssl documentation

If you would like to simply prioritize the use of cipher suites, you can issue the SSLHonorCipherOrder directive at either the Server or VirtualHost contexts. This makes Apache prefer the leftmost cipher it can negotiate from your SSLCipherSuite list.