Having recently moved some of our hosting infrastructure to the excellent Rackspace Platform group, we inherited the management of the Cisco 11500 Series Content Services Switches (CSS), which we use for general load balancing + ssl termination.
As a side note, it’s really powerful, fast, and well, plain nice. Not having to manage SSL certs on each apache instance is really nice, and all the LAN communication is done over plain old HTTP.
This blog post is a regurgitation of some notes I took internally. Perhaps someone who finds themselves managing this device will benefit…
The task at hand was re-issuing and updating one of our primary wildcard certificates that powers a lot of subdomains.
The first step is to generate the key, csr, and crt…
All these files should be:
- Named the same as the domain that SSL is being generated for.
- use WILD for a wildcard subdomain
- Use this format “www.domain.com-0810.key”, where 08 is the from year and 10 is the to year
- (the short version is because of name length limits on the CSS)
Start by generating the key and csr
This should be done in the ciscoftp role under the ~/load directory
# openssl genrsa -out WILD.vosecure.com-0810.key 1024 # openssl req -new -key WILD.vosecure.com-0810.key -out WILD.vosecure.com-0810.csr
Then get the certificate issued by (global sign)
Put the certificate into the the ~/load directory. When done, it should look like:
-rw-rw-r-- 1 ciscoftp ciscoftp 3139 Apr 6 15:59 WILD.vosecure.com-0810.crt -rw-rw-r-- 1 ciscoftp ciscoftp 773 Apr 6 15:49 WILD.vosecure.com-0810.csr -rw-rw-r-- 1 ciscoftp ciscoftp 883 Apr 6 15:47 WILD.vosecure.com-0810.key
Put the crt and key onto the load balancer
To do this, use the “copy command” on the load balancer
20132-201292# copy ssl ftp base import WILD.vosecure.com-0810.crt PEM "rack" 20132-201292# copy ssl ftp base import WILD.vosecure.com-0810.key PEM "rack" Then make the associations... 20132-201292# config 20132-201292(config)# ssl associate cert WILD.vosecure.com-0810.crt WILD.vosecure.com-0810.crt 20132-201292(config)# ssl associate cert WILD.vosecure.com-0810.key WILD.vosecure.com-0810.key
Now, it’s time to install it. Requires SSL downtime!
- Suspend the SSL content rule
- Suspend the SSL service
- Suspend the SSL proxy list
- Run the updates
- Activate the SSL proxy list
- Activate the SSL service
- Activate the SSL content rule
Here are the exact commands:
20132-201292# config 20132-201292(config)# owner vosecure.com 20132-201292(config-owner[vosecure.com])# content 74.205.111.161-ssl 20132-201292(config-owner-content[vosecure.com-74.205.111.161-ssl])# suspend 20132-201292# config 20132-201292(config)# service ssl-service 20132-201292(config-service[ssl-service])# suspend 20132-201292# config 20132-201292(config)# ssl-proxy-list ssl-proxy
In the following commands, we remove the whole ssl-server so that it shows up at the bottom in one concise unit. Otherwise, the startup-config and running-config become fragmented.
20132-201292(config-ssl-proxy-list[ssl-proxy])# suspend 20132-201292(config-ssl-proxy-list[ssl-proxy])# no ssl-server 6 20132-201292(config-ssl-proxy-list[ssl-proxy])# ssl-server 6 20132-201292(config-ssl-proxy-list[ssl-proxy])# ssl-server 6 rsakey WILD.vosecure.com-0810.key 20132-201292(config-ssl-proxy-list[ssl-proxy])# ssl-server 6 rsacert WILD.vosecure.com-0810.crt 20132-201292(config-ssl-proxy-list[ssl-proxy])# ssl-server 6 vip address 192.168.1.161 20132-201292(config-ssl-proxy-list[ssl-proxy])# ssl-server 6 cipher rsa-with-rc4-128-sha 192.168.1.161 81 20132-201292(config-ssl-proxy-list[ssl-proxy])# active 20132-201292# config 20132-201292(config)# service ssl-service 20132-201292(config-service[ssl-service])# active 20132-201292# config 20132-201292(config)# owner vosecure.com 20132-201292(config-owner[vosecure.com])# content 74.205.111.161-ssl 20132-201292(config-owner-content[vosecure.com-74.205.111.161-ssl])# active Test test test. Firefox, IE, Chrome... 20132-201292# copy running-config ftp base running-config Review changes with git diff 20132-201292# write memory 20132-201292# copy startup-config ftp base startup-config
And… Here is the git diff
diff --git a/load/startup-config b/load/startup-config index 7042490..36fbbaa 100644 --- a/load/startup-config +++ b/load/startup-config @@ -1,4 +1,4 @@ -!Generated on 04/06/2009 16:05:48 +!Generated on 04/06/2009 21:51:02 !Active version: sg0810205 @@ -64,6 +64,8 @@ configure + ssl associate rsakey WILD.vosecure.com-0810.key WILD.vosecure.com-0810.key + ssl associate cert WILD.vosecure.com-0810.crt WILD.vosecure.com-0810.crt !*********************** SSL PROXY LIST *********************** ssl-proxy-list ssl-proxy - ssl-server 6 - ssl-server 6 rsakey vosecure.com(080421-04300)-key - ssl-server 6 rsacert vosecure.com(080421-04300)-cert - ssl-server 6 vip address 192.168.1.161 - ssl-server 6 cipher rsa-with-rc4-128-sha 192.168.1.161 81 @@ -146,6 +141,11 @@ ssl-proxy-list ssl-proxy + ssl-server 6 + ssl-server 6 rsakey WILD.vosecure.com-0810.key + ssl-server 6 rsacert WILD.vosecure.com-0810.crt + ssl-server 6 vip address 192.168.1.161 + ssl-server 6 cipher rsa-with-rc4-128-sha 192.168.1.161 81 active