Posted in : NetScaler By Simon Gottschlag Translate with Google ⟶

8 years ago

Att konfigurera olika inställningar för SSL på Citrix NetScalers virtual servers blev enklare för ett tag sedan då SSL Profiles släpptes. Det man behövde göra då var att skapa en profil, binda den mot den virtuella servern (eller service/serviceGroup om det är en backend profile) samt lägga på ciphers. Detta gjorde att det blev en hel del konfiguration per virtual server/service/serviceGroup.
Tidigare kunde det se ut så här:

unbind ssl vserver <vServer Namn> -cipherName ALL
bind ssl vserver <vServer Namn> -cipherName SSLCipher-NSVPX-Secure
bind ssl vserver <vServer Namn> -eccCurveName ALL
set ssl vserver <vServer Namn> -sslProfile SSLProf-FE-SecOptimized

I och med den senaste versionen (11.0 build 64.34) utökades funktionaliteten så konfigurationen blir betydligt enklare. Se nedan för beskrivningen från Citrix Release Notes:

Enhanced SSL Profile
The SSL infrastructure on the NetScaler appliance is continually updated to address the ever growing requirements for security and performance. Vulnerabilities in SSLv3 and RC4 implementation have emphasized the need to use the latest ciphers and protocols to negotiate the security settings for a network connection. Implementing any changes to the configuration, such as disabling SSLv3, across thousands of SSL end points is a cumbersome process. Therefore, settings that were part of the SSL end points configuration have been moved to the SSL profile, along with the default ciphers. To implement any change in the configuration, including cipher support, you need only modify the profile. If the profile is enabled, the change is immediately reflected in all the end points that the profile is bound to.
Important: After the upgrade, if you enable the profile, you cannot reverse the changes. That is, the profile cannot be disabled.
[# 533640]

Mer information om hur det fungerar finns på Citrix Product Documentation.
Vad behöver då göras för att konfigurera detta? Se nedan, men gör det i en testmiljö först då det inte går att inaktivera när det väl är aktiverat.

  1. Börja med att aktivera default-profiler i SSL-paramterar
    set ssl parameter -defaultProfile ENABLED

     

  2. Nästa steg, om det inte redan finns, så skapa en diffie hellman-nyckel
    create ssl dhParam dhkey-2048 -gen 2 2048

     

  3. Därefter, skapa en cipher-lista – exempelvis enligt Steven Wrights blog Scoring an A+ at SSLlabs.com with Citrix NetScaler (the sequel)
    Exempel på lista för MPX

    add ssl cipher SSLCipher-NSMPX-Secure
    bind ssl cipher SSLCipher-NSMPX-Secure -cipherName TLS1.2-ECDHE-RSA-AES256-GCM-SHA384 -cipherPriority 1
    bind ssl cipher SSLCipher-NSMPX-Secure -cipherName TLS1.2-ECDHE-RSA-AES128-GCM-SHA256 -cipherPriority 2
    bind ssl cipher SSLCipher-NSMPX-Secure -cipherName TLS1.2-ECDHE-RSA-AES-256-SHA384 -cipherPriority 3
    bind ssl cipher SSLCipher-NSMPX-Secure -cipherName TLS1.2-ECDHE-RSA-AES-128-SHA256 -cipherPriority 4
    bind ssl cipher SSLCipher-NSMPX-Secure -cipherName TLS1-ECDHE-RSA-AES256-SHA -cipherPriority 5
    bind ssl cipher SSLCipher-NSMPX-Secure -cipherName TLS1-ECDHE-RSA-AES128-SHA -cipherPriority 6
    bind ssl cipher SSLCipher-NSMPX-Secure -cipherName TLS1.2-DHE-RSA-AES256-GCM-SHA384 -cipherPriority 7
    bind ssl cipher SSLCipher-NSMPX-Secure -cipherName TLS1.2-DHE-RSA-AES128-GCM-SHA256 -cipherPriority 8
    bind ssl cipher SSLCipher-NSMPX-Secure -cipherName TLS1-DHE-RSA-AES-256-CBC-SHA -cipherPriority 9
    bind ssl cipher SSLCipher-NSMPX-Secure -cipherName TLS1-DHE-RSA-AES-128-CBC-SHA -cipherPriority 10
    bind ssl cipher SSLCipher-NSMPX-Secure -cipherName TLS1-AES-256-CBC-SHA -cipherPriority 11
    bind ssl cipher SSLCipher-NSMPX-Secure -cipherName TLS1-AES-128-CBC-SHA -cipherPriority 12
    bind ssl cipher SSLCipher-NSMPX-Secure -cipherName SSL3-DES-CBC3-SHA -cipherPriority 13

    Exempel på list för VPX

    add ssl cipher SSLCipher-NSVPX-Secure
    bind ssl cipher SSLCipher-NSVPX-Secure -cipherName TLS1.2-ECDHE-RSA-AES-128-SHA256 -cipherPriority 1
    bind ssl cipher SSLCipher-NSVPX-Secure -cipherName TLS1-ECDHE-RSA-AES256-SHA -cipherPriority 2
    bind ssl cipher SSLCipher-NSVPX-Secure -cipherName TLS1-ECDHE-RSA-AES128-SHA -cipherPriority 3
    bind ssl cipher SSLCipher-NSVPX-Secure -cipherName TLS1-DHE-RSA-AES-256-CBC-SHA -cipherPriority 4
    bind ssl cipher SSLCipher-NSVPX-Secure -cipherName TLS1-DHE-RSA-AES-128-CBC-SHA -cipherPriority 5
    bind ssl cipher SSLCipher-NSVPX-Secure -cipherName TLS1-AES-256-CBC-SHA -cipherPriority 6
    bind ssl cipher SSLCipher-NSVPX-Secure -cipherName TLS1-AES-128-CBC-SHA -cipherPriority 7
    bind ssl cipher SSLCipher-NSVPX-Secure -cipherName SSL3-DES-CBC3-SHA -cipherPriority 8

     

  4. Därefter modifiera default-profilerna för att applicera det till alla vservrar/services/serviceGroups som inte redan har någon profil:
    set ssl profile ns_default_ssl_profile_frontend -dhCount 1000 -dh ENABLED -dhFile "/nsconfig/ssl/dhkey-2048" -denySSLReneg NONSECURE
    unbind ssl profile ns_default_ssl_profile_frontend -cipherName FlushAllCiphers
    bind ssl profile ns_default_ssl_profile_frontend -cipherName SSLCipher-NSMPX-Secure -cipherPriority 1
    set ssl profile ns_default_ssl_profile_backend -denySSLReneg NONSECURE
    unbind ssl profile ns_default_ssl_profile_backend -cipherName FlushAllCiphers
    bind ssl profile ns_default_ssl_profile_backend -cipherName SSLCipher-NSMPX-Secure -cipherPriority 1

     

  5. Som sista steg kan en header infogas för Strict Transport Security, i nedan exempel globalt:
    add rewrite action RWA-RES-INSERT_HSTS insert_http_header Strict-Transport-Security "\"max-age=31536000\""
    add rewrite policy RWP-RES-INSERT_HSTS-NOOP "CLIENT.SSL.IS_SSL" NOREWRITE
    add rewrite policy RWP-RES-INSERT_HSTS "CLIENT.SSL.IS_SSL" RWA-RES-INSERT_HSTS
    add rewrite policylabel RWPL-RES-INSERT_HSTS http_res
    bind rewrite policylabel RWPL-RES-INSERT_HSTS RWP-RES-INSERT_HSTS 100 END
    bind rewrite global RWP-RES-INSERT_HSTS-NOOP 10 NEXT -type RES_OVERRIDE -invoke policylabel RWPL-RES-INSERT_HSTS

     

När detta är klart skall det förhoppningsvis vara betydligt smidigare att hålla konfigurationen standardiserad.
 

Tags : A+, Citrix, NetScaler, SSL

Personlig rådgivning

Vi erbjuder personlig rådgivning med författaren för 1400 SEK per timme. Anmäl ditt intresse i här så återkommer vi så snart vi kan.

Add comment

Your comment will be revised by the site if needed.