Table Of Contents
CSM-S Configuration Example (Bridge Mode, No NAT)
CSM-S Configuration Example (Router Mode, Server NAT)
CSM-S and SSLM Configuration Example (Router Mode, Server NAT)
Integrated Secure Content-Switching Service Example
Configuring the SSL Daughter Card
Certificate Security Attribute-Based Access Control Examples
HTTP Header Insertion Examples
SSL Configuration Examples
This appendix contains these sections:
•CSM-S Configuration Example (Bridge Mode, No NAT)
•CSM-S Configuration Example (Router Mode, Server NAT)
•CSM-S and SSLM Configuration Example (Router Mode, Server NAT)
•Integrated Secure Content-Switching Service Example
•Certificate Security Attribute-Based Access Control Examples
•HTTP Header Insertion Examples
CSM-S Configuration Example (Bridge Mode, No NAT)
This section describes a CSM-S configuration which allows a client to load balance HTTP to three web servers (IP addresses 192.168.6.10, 192.168.6.20, and 192.168.6.30) and offload HTTPS then load balance to the same three web servers.
In this example, the CSM-S client VLAN and the server VLAN for the SSL daughter card are configured in the same IP subnet (bridge mode), while the web servers are on a private IP network and reside in a separate VLAN. (See Figure B-1.)
The CSM-S is configured so that it does not perform NAT operations when it is directing encrypted traffic to the SSL daughter card. The SSL daughter card is also configured not to perform NAT operations when it is sending decrypted traffic back to the CSM-S for load balancing the decrypted traffic. The CSM-S is then configured to perform NAT for the decrypted traffic to the selected destination server.
The administration network is separate from the client traffic networks and must reside in its own administration VLAN, which must be configured on both the CSM-S and SSL Daughter Card.
Figure B-1 Bridge Mode, No NAT Configuration Example
The following addresses are configured on the CSM-S:
•Client clear text traffic—10.90.14.181:80
•Client SSL traffic—10.90.14.181:443
•Decrypted traffic from SSL daughter card—10.90.14.181:80
•Client VLAN 225 with IP address 10.90.14.245 for client communication
•Server VLAN 443 with IP address 10.90.14.245, and alias 10.90.14.242 for SSL Daughter Card communication
•Server VLAN 999 with IP address 172.16.1.2 to allow Administrative communication to reach the SSL Daughter Card
•Server VLAN 6 with IP address 192.168.6.2, and an alias 192.168.6.1 for real server communications.
The following address is configured on the SSL daughter card:
•10.90.14.181:443 (this IP address is configured with the secondary keyword which is a CSM-S and bridge mode requirement).
•VLAN 443 with IP address 10.90.14.243 and a gateway of 10.90.14.1.
•VLAN 999with IP address 172.16.1.3, a gateway of 172.16.1.1, and admin enabled.
Figure B-1 shows VLAN 225and VLAN 443 in the same subnet and VLAN 6 in a separate subnet.
Add all the VLANs (listed above) to the VLAN database, and configure the IP address on the VLAN interface for VLAN 999, VLAN 225 and VLAN 6 on the MSFC. Configure
Note While VLAN 999 (172.16.1.1) and VLAN 225 (10.90.14.1) exist as Layer 3 interfaces on the MSFC. VLAN 443 and VLAN 6 (192.168.6.1) exist as VLANs in the VLAN database, but they do not have corresponding Layer 3 interfaces on the MSFC.
This example shows how to create the Layer 2 and Layer 3 VLANs on the switch MSFC:
Cat6k# configure terminalEnter configuration commands, one per line. End with CNTL/Z.Cat6k(config)# vlan 6Cat6k(config-vlan)# name Server_communicationsCat6k(config-if)# vlan 225Cat6k(config-vlan)# name Client_communicationsCat6k(config-vlan)# interface Vlan225Cat6k(config-if)# ip address 10.90.14.1 255.255.255.0Cat6k(config-if)# no shutdownCat6k(config-if)# vlan 443Cat6k(config-vlan)# name SSL-DC_communicationsCat6k(config-if)# vlan 999Cat6k(config-vlan)# name SSL-DC_administrativeCat6k(config-vlan)# interface Vlan999Cat6k(config-if)# ip address 172.16.1.1 255.255.255.0Cat6k(config-if)# no shutdown
This example shows how to create the client and server VLANs on the CSM-S installed in slot number 5:
Cat6k# configure terminalEnter configuration commands, one per line. End with CNTL/Z.Cat6k(config-module-csm)# module ContentSwitchingModule 5Cat6k(config-module-csm)# vlan 999 serverCat6k(config-slb-vlan-server)# ip address 172.16.1.2 255.255.255.0Cat6k(config-slb-vlan-server)# vlan 225 clientCat6k(config-slb-vlan-client)# description Client TrafficCat6k(config-slb-vlan-client)# ip address 10.90.14.245 255.255.255.0Cat6k(config-slb-vlan-client)# gateway 10.90.14.1Cat6k(config-slb-vlan-client)# !Cat6k(config-slb-vlan-client)# vlan 6 serverCat6k(config-slb-vlan-server)# description Server TrafficCat6k(config-slb-vlan-server)# ip address 192.168.6.2 255.255.255.0Cat6k(config-slb-vlan-server)# alias 192.168.6.1 255.255.255.0Cat6k(config-slb-vlan-server)# !Cat6k(config-slb-vlan-server)# vlan 443 serverCat6k(config-slb-vlan-server)# ip address 10.90.14.245 255.255.255.0This example shows how to create real servers with names.Cat6k(config-slb-vlan-server)# real LINUXCat6k(config-slb-module-real)# address 192.168.6.10Cat6k(config-slb-module-real)# inserviceCat6k(config-slb-module-real)# real WIN2KCat6k(config-slb-module-real)# address 192.168.6.20Cat6k(config-slb-module-real)# inserviceCat6k(config-slb-module-real)# real SUNCat6k(config-slb-module-real)# address 192.168.6.30Cat6k(config-slb-module-real)# inserviceThis example shows how to create the server farm of web servers (configured with server NAT) and the server farm of the SSL daughter card (configured with no server NAT and local):
Cat6k(config-slb-module-real)# serverfarm SSLOFFLOADERSCat6k(config-slb-sfarm)# no nat serverCat6k(config-slb-sfarm)# real 10.90.14.243 local
Note The keyword local is required to configure the CSM-S to send traffic to this real over the local VLAN to the SSL Daughter Card.
Cat6k(config-slb-real)# inserviceCat6k(config-slb-real)# serverfarm WEBCat6k(config-slb-sfarm)# real name LINUXCat6k(config-slb-real)# inserviceCat6k(config-slb-real)# real name WIN2KCat6k(config-slb-real)# inserviceCat6k(config-slb-real)# real name SUNCat6k(config-slb-real)# inserviceThis example shows how to configure the two virtual servers to direct HTTPS traffic to the SSL daughter card for off loading and to load balance HTTP to web servers. In this example, the web servers are receiving traffic to port 80 only, either directly from the clients or as decrypted traffic from the SSL daughter cards (since no port translation is configured).
Cat6k(config-slb-module-real)# serverfarm SSLOFFLOADERSCat6k(config-slb-sfarm)# no nat serverCat6k(config-slb-sfarm)# real 10.90.14.243 localCat6k(config-slb-real)# inserviceCat6k(config-slb-real)# serverfarm WEBCat6k(config-slb-sfarm)# real name LINUXCat6k(config-slb-real)# inserviceCat6k(config-slb-real)# real name WIN2KCat6k(config-slb-real)# inserviceCat6k(config-slb-real)# real name SUNCat6k(config-slb-real)# inserviceThis example shows how to configure the two virtual servers to direct HTTP traffic to the SSL daughter card for off loading and to load balance HTTP to web servers. In this example, the web servers are receiving traffic to port 80 only, either directly from the clients or as decrypted traffic from the SSL daughter cards (since no port translation is configured).
Cat6k(config-slb-real)# vserver SSLTERMINATIONCat6k(config-slb-vserver)# virtual 10.90.14.181 tcp httpsCat6k(config-slb-vserver)# vlan 225Cat6k(config-slb-vserver)# serverfarm SSLOFFLOADERSCat6k(config-slb-vserver)# persistent rebalanceCat6k(config-slb-vserver)# inserviceCat6k(config-slb-vserver)# vserver WEBSERVERSCat6k(config-slb-vserver)# virtual 10.90.14.181 tcp wwwCat6k(config-slb-vserver)# serverfarm WEBCat6k(config-slb-vserver)# persistent rebalanceCat6k(config-slb-vserver)# inserviceCat6k(config-slb-vserver)# exitCat6k(config-module-csm)# exitCat6k(config)# exitThis example shows how to configure the administration VLAN on the SSL daughter card to communicate over the VLAN 999:
SSL-DC# configure terminalEnter configuration commands, one per line. End with CNTL/Z.SSL-DC(config)# ssl-proxy vlan 999SSL-DC(config-vlan)# ipaddr 172.16.1.3 255.255.255.0SSL-DC(config-vlan)# gateway 172.16.1.1SSL-DC(config-vlan)# adminNext the VLAN 443 is configured to allow communication with clients for off loading client SSL connections:SSL-DC(config-vlan)# ssl-proxy vlan 443SSL-DC(config-vlan)# ipaddr 10.90.14.243 255.255.255.0SSL-DC(config-vlan)# gateway 10.90.14.1To complete the configuration, enter the ssl-proxy service command to create a new service on the SSL daughter card (sslterm). This example shows how to configure a virtual IP address that matches the virtual server created on the CSM-S. (This virtual IP address is configured with the secondary keyword so that the SSL daughter card does not reply to ARP requests for this IP address. This is also a requirement for bridging network designs) The service is configured to send decrypted traffic back to the CSM-S without performing NAT.
SSL-DC(config-vlan)# ssl-proxy service ssltermSSL-DC(config-ssl-proxy)# virtual ipaddr 10.90.14.181 protocol tcp port 443 secondarySSL-DC(config-ssl-proxy)# server ipaddr 10.90.14.245 protocol tcp port 80SSL-DC(config-ssl-proxy)# no nat serverSSL-DC(config-ssl-proxy)# certificate rsa general-purposetrustpoint certs-key*Aug 19 20:52:11.487: %STE-6-PKI_SERVICE_CERT_INSTALL: Proxy: sslterm, Trustpoint: certs-key, Key: RSAKEY, Serial#: 1A65, Index: 2*Aug 19 20:52:11.487: %STE-6-PKI_CA_CERT_INSTALL: Root, Subject Name: CN = Thawte Test CA Root, OU = TEST TEST TEST, O = Thawte Certification, ST = FOR TESTINGPURPOSES ONLY, C = ZA, Serial#: 00, Index: 3SSL-DC(config-ssl-proxy)# inservice*Aug 19 20:52:11.515: %STE-5-UPDOWN: ssl-proxy service sslterm changed state toUPThese examples show the output of the various show commands on the MSFC and CSM:
Cat6k# show module csm 5 vlan detailvlan IP address IP mask type---------------------------------------------------6 192.168.6.2 255.255.255.0 SERVERDescription: Server TrafficALIASESIP address IP mask--------------------------------192.168.6.1 255.255.255.0225 10.90.14.245 255.255.255.0 CLIENTDescription: Client TrafficGATEWAYS10.90.14.129443 10.90.14.245 255.255.255.0 SERVER999 172.16.1.2 255.255.255.0 SERVERCat6k# show module csm 5 realreal server farm weight state conns/hits-------------------------------------------------------------------------10.90.14.243 SSLOFFLOADERS 8 OPERATIONAL 0LINUX WEB 8 OPERATIONAL 0WIN2K WEB 8 OPERATIONAL 0SUN WEB 8 OPERATIONAL 0Cat6k# show module csm 5 vserver detailSSLTERMINATION, type = SLB, state = OPERATIONAL, v_index = 12virtual = 10.90.14.181/32:443 bidir, TCP, service = NONE, advertise = FALSEidle = 3600, replicate csrp = none, vlan = 225, pending = 30, layer 4max parse len = 2000, persist rebalance = TRUEssl sticky offset = 0, length = 32conns = 1, total conns = 4Default policy:server farm = SSLOFFLOADERS, backup = <not assigned>sticky: timer = 0, subnet = 0.0.0.0, group id = 0Policy Tot matches Client pkts Server pkts-----------------------------------------------------(default) 4 32 21WEBSERVERS, type = SLB, state = OPERATIONAL, v_index = 13virtual = 10.90.14.181/32:80 bidir, TCP, service = NONE, advertise = FALSEidle = 3600, replicate csrp = none, vlan = ALL, pending = 30, layer 4max parse len = 2000, persist rebalance = TRUEssl sticky offset = 0, length = 32conns = 1, total conns = 7Default policy:server farm = WEB, backup = <not assigned>sticky: timer = 0, subnet = 0.0.0.0, group id = 0Policy Tot matches Client pkts Server pkts-----------------------------------------------------(default) 7 45 35These examples show the output of the various show commands on the SSL daughter card:
SSL-DC# show ssl-proxy service ssltermService id: 1, bound_service_id: 257Virtual IP: 10.90.14.181, port: 443 (secondary configured)Server IP: 10.90.14.245, port: 80rsa-general-purpose certificate trustpoint: certs-keyCertificate chain for new connections:Certificate:Key Label: RSAKEY, 1024-bit, not exportableKey Timestamp: 02:03:11 UTC Aug 19 2004Serial Number: 1A65Root CA Certificate:Serial Number: 00Certificate chain completeAdmin Status: upOperation Status: upSSL-DC# show ssl-proxy statsTCP Statistics:Conns initiated : 4 Conns accepted : 4Conns established : 8 Conns dropped : 4Conns Allocated : 4 Conns Deallocated : 4Conns closed : 8 SYN timeouts : 0Idle timeouts : 0 Total pkts sent : 43Data packets sent : 19 Data bytes sent : 5875Total Pkts rcvd : 48 Pkts rcvd in seq : 21Bytes rcvd in seq : 3264SSL Statistics:conns attempted : 4 conns completed : 4full handshakes : 2 resumed handshakes : 2active conns : 0 active sessions : 0renegs attempted : 0 conns in reneg : 0handshake failures : 0 data failures : 0fatal alerts rcvd : 0 fatal alerts sent : 0no-cipher alerts : 0 ver mismatch alerts : 0no-compress alerts : 0 bad macs received : 0pad errors : 0 session fails : 0FDU Statistics:IP Frag Drops : 0 IP Version Drops : 0IP Addr Discards : 0 Serv_Id Drops : 0Conn Id Drops : 0 Bound Conn Drops : 0Vlan Id Drops : 0 TCP Checksum Drops : 0Hash Full Drops : 0 Hash Alloc Fails : 0Flow Creates : 8 Flow Deletes : 8Conn Id allocs : 4 Conn Id deallocs : 4Tagged Pkts Drops : 0 Non-Tagg Pkts Drops : 0Add ipcs : 3 Delete ipcs : 0Disable ipcs : 2 Enable ipcs : 0Unsolicited ipcs : 127 Duplicate Add ipcs : 0IOS Broadcast Pkts : 613 IOS Unicast Pkts : 1110IOS Multicast Pkts : 0 IOS Total Pkts : 1723IOS Congest Drops : 0 SYN Discards : 0CSM-S Configuration Example (Router Mode, Server NAT)
This section describes a CSM-S configuration which allows a client to load balance HTTP to three web servers (IP addresses 192.168.6.10, 192.168.6.20, and 192.168.6.30) and offload HTTPS then load balance to the same three web servers.
In this example, the CSM-S client VLAN is on a public network, the server VLAN for the SSL daughter card is in the a private IP subnet, and the web servers are in a different private IP network and reside in a separate VLAN. (See Figure B-2.)
The CSM-S is configured to perform the default server NAT operations to direct encrypted client traffic to the SSL daughter card. The SSL daughter card is also configured to perform server NAT operations when sending decrypted traffic back to the CSM-S. The CSM-S is then configured to perform another NAT on the decrypted traffic to the selected destination server.
Figure B-2 Configuration Example—Router Mode, Server NAT
The following addresses are configured on the CSM-S virtual servers:
•Client clear text traffic—10.90.14.182:80
•Client SSL traffic—10.90.14.182:443
•Decrypted traffic from SSL daughter card—10.90.14.182:80
•Client VLAN 225 with IP address 10.90.14.245 for client communication
•Server VLAN 14 with IP address 172.16.14.245, and alias 172.16.14.1 for SSL Daughter Card communication
•Server VLAN 6 with IP address 192.168.6.2, and an alias 192.168.6.1 for real server communications
The following address is configured on the SSL daughter card:
•172.16.14.182:443 (this IP address is configured with the secondary keyword a CSM-S requirement)
•VLAN 14 with IP address 172.16.14.243, a route for client traffic to the CSM-S VLAN interface, and a gateway of 172.16.14.254 for routing administrative traffic.
Figure B-2, shows VLAN 225, VLAN 14 and VLAN 6 are each in separate subnets.
Add all the VLANs (listed above) to the VLAN database, and configure the IP address on the VLAN interface for VLAN 14 and VLAN 225 on the MSFC.
Note VLAN 225 (10.90.14.1) exists as a Layer 3 interface on the MSFC to route Client traffic to the CSM-S. VLAN 14 (172.16.1.254) is also configured on the MSFC to allow administrative traffic to be routed to the SSL Daughter Card. VLAN 14 (172.16.14.1) is configured on the CSM-S to send and received SSL traffic to/from the SSL Daughter Card. VLAN 6 (192.168.6.1) exists only as a VLAN in the VLAN database and as CSM-S and SSL Daughter Card VLANs, but it does not have corresponding Layer 3 interfaces on the MSFC.
This example creates the Layer 2 and Layer 3 VLANs on the switch MSFC:
Cat6k# configure terminalEnter configuration commands, one per line. End with CNTL/Z.Cat6k(config)# vlan 6Cat6k(config-vlan)# name Server_communicationsCat6k(config)# vlan 14Cat6k(config-vlan)# name SSL-DC_communicationsCat6k(config-vlan)# interface Vlan14Cat6k(config-if)# ip address 172.16.14.254 255.255.255.0Cat6k(config-if)# no shutdownCat6k(config-if)# vlan 225Cat6k(config-vlan)# name Client_communicationsCat6k(config-vlan)# interface Vlan225Cat6k(config-if)# ip address 10.90.14.1 255.255.255.0Cat6k(config-if)# no shutdownThis example shows how to create the client and server VLANs on the CSM installed in slot number 5:
Cat6k# configure terminalEnter configuration commands, one per line. End with CNTL/Z.Cat6k(config)# module ContentSwitchingModule 5Cat6k(config-module-csm)# vlan 225 clientCat6k(config-slb-vlan-client)# description Client TrafficCat6k(config-slb-vlan-client)# ip address 10.90.14.245 255.255.255.0Cat6k(config-slb-vlan-client)# gateway 10.90.14.1Cat6k(config-slb-vlan-client)# vlan 6 serverCat6k(config-slb-vlan-server)# description Server TrafficCat6k(config-slb-vlan-server)# ip address 192.168.6.2 255.255.255.0Cat6k(config-slb-vlan-server)# alias 192.168.6.1 255.255.255.0Cat6k(config-slb-vlan-server)# vlan 14 serverCat6k(config-slb-vlan-server)# ip address 172.16.14.245 255.255.255.0Cat6k(config-slb-vlan-server)# alias 172.16.14.1 255.255.255.0This example shows how to create real servers with names.Cat6k(config-slb-vlan-server)# real LINUXCat6k(config-slb-module-real)# address 192.168.6.10Cat6k(config-slb-module-real)# inserviceCat6k(config-slb-module-real)# real WIN2KCat6k(config-slb-module-real)# address 192.168.6.20Cat6k(config-slb-module-real)# inserviceCat6k(config-slb-module-real)# real SUNCat6k(config-slb-module-real)# address 192.168.6.30Cat6k(config-slb-module-real)# inserviceThis example shows how to create the server farm of web servers (configured with server NAT) and the server farm of the SSL daughter card (configured with server NAT and local):
Cat6k(config-slb-module-real)# serverfarm SSLOFFLOADERSCat6k(config-slb-sfarm)# nat serverCat6k(config-slb-sfarm)# no nat clientCat6k(config-slb-sfarm)# real 172.16.14.182 local
Note The keyword local is required to configure the CSM-S to send traffic to this real over the local VLAN to the SSL Daughter Card.
Cat6k(config-slb-real)# inserviceCat6k(config-slb-real)# serverfarm WEBCat6k(config-slb-sfarm)# nat serverCat6k(config-slb-sfarm)# no nat clientCat6k(config-slb-sfarm)# real name LINUXCat6k(config-slb-real)# inserviceCat6k(config-slb-real)# real name WIN2KCat6k(config-slb-real)# inserviceCat6k(config-slb-real)# real name SUNCat6k(config-slb-real)# inserviceThis example shows how to configure the two virtual servers. In this example, the web servers receive requests to port 80 directly from the clients. HTTPS traffic is received on port 443 and sent to the SSL Daughter Card for decryption. Upon decryption, the HTTP traffic is sent to the public HTTP virtual for load balancing:
Cat6k(config-slb-real)# vserver SSLTERMINATIONCat6k(config-slb-vserver)# virtual 10.90.14.182 tcp httpsCat6k(config-slb-vserver)# serverfarm SSLOFFLOADERSCat6k(config-slb-vserver)# persistent rebalanceCat6k(config-slb-vserver)# inserviceCat6k(config-slb-vserver)# vserver WEBSERVERSCat6k(config-slb-vserver)# virtual 10.90.14.182 tcp wwwCat6k(config-slb-vserver)# serverfarm WEBCat6k(config-slb-vserver)# persistent rebalanceCat6k(config-slb-vserver)# inserviceThis example shows how to configure the SSL Daughter Card to communicate with the CSM-S over VLAN 14 for client traffic and administrative traffic:
SSL-DC# configure terminalEnter configuration commands, one per line. End with CNTL/Z.SSL-DC(config)# ssl-proxy vlan 14SSL-DC(config-vlan)# ipaddr 172.16.14.243 255.255.255.0SSL-DC(config-vlan)# gateway 172.16.14.254SSL-DC(config-vlan)# route 10.90.14.0 255.255.255.0 gateway 172.16.14.1SSL-DC(config-vlan)# admin
Note The gateway command is required for routing administrative communication. The router defined only effects traffic destined for the VLAN IP address (TELNET, SSH, and so on...)
The route statement is required to route traffic back to the CSM-S alias IP when the SSL Daughter Card is receiving encrypted traffic on one network and sending decrypted traffic to a different IP network.
Note The administrative VLAN can be configured separately if required by adding a new VLAN and the appropriate IP address on both the CSM-S and SSL daughter card.
To complete the configuration, enter the ssl-proxy service command to create a new service on the SSL daughter card (sslterm). This example shows how to configure a virtual IP address that matches the virtual server created on the CSM-S. (This virtual IP address is configured with the secondary keyword so that the SSL daughter card does not reply to ARP requests for this IP address. This is also a requirement for bridging network designs) The service is configured to send decrypted traffic back to the CSM-S while performing NAT on the destination address:
SSL-DC(config-vlan)# ssl-proxy service ssltermSSL-DC(config-ssl-proxy)# virtual 172.16.14.182 protocol tcp port 443 secondarySSL-DC(config-ssl-proxy)# server ipaddr 10.90.14.182 protocol tcp port 80SSL-DC(config-ssl-proxy)# certificate rsa general-purpose trustpoint certs-key*Aug 22 14:44:47.395: %STE-6-PKI_SERVICE_CERT_INSTALL: Proxy: sslterm, Trustpoint: certs-key, Key: RSAKEY, Serial#: 1A65, Index: 6*Aug 22 14:44:47.395: %STE-6-PKI_CA_CERT_INSTALL: Root, Subject Name: CN = Thawte Test CA Root, OU = TEST TEST TEST, O = Thawte Certification, ST = FOR TESTINGPURPOSES ONLY, C = ZA, Serial#: 00, Index: 7SSL-DC(config-ssl-proxy)# inservice*Aug 22 14:44:47.423: %STE-5-UPDOWN: ssl-proxy service sslterm changed state to UPCat6k # configure terminalEnter configuration commands, one per line. End with CNTL/Z.Cat6k(config)# interface Vlan14Cat6k(config-if)# ip address 172.16.14.254 255.255.255.0Cat6k(config-if)# no shutdownThese examples show the output of the various show commands on the MSFC and CSM:
cat6k# show mod csm 5 vlan detailvlan IP address IP mask type---------------------------------------------------6 192.168.6.2 255.255.255.0 SERVERDescription: Server TrafficALIASESIP address IP mask--------------------------------192.168.6.1 255.255.255.014 172.16.14.245 255.255.255.0 SERVERALIASESIP address IP mask--------------------------------172.16.14.1 255.255.255.0225 10.90.14.245 255.255.255.0 CLIENTDescription: Client TrafficGATEWAYS10.90.14.129Cat6k# show mod csm 5 realreal server farm weight state conns/hits-------------------------------------------------------------------------172.16.14.182 SSLOFFLOADERS 8 OPERATIONAL 0LINUX WEB 8 OPERATIONAL 0WIN2K WEB 8 OPERATIONAL 0SUN WEB 8 OPERATIONAL 0Cat6k# show mod csm 5 vserver detailSSLTERMINATION, type = SLB, state = OPERATIONAL, v_index = 20virtual = 10.90.14.182/32:443 bidir, TCP, service = NONE, advertise = FALSEidle = 3600, replicate csrp = none, vlan = ALL, pending = 30, layer 4max parse len = 2000, persist rebalance = TRUEssl sticky offset = 0, length = 32conns = 0, total conns = 8Default policy:server farm = SSLOFFLOADERS, backup = <not assigned>sticky: timer = 0, subnet = 0.0.0.0, group id = 0Policy Tot matches Client pkts Server pkts-----------------------------------------------------(default) 8 75 46WEBSERVERS, type = SLB, state = OPERATIONAL, v_index = 21virtual = 10.90.14.182/32:80 bidir, TCP, service = NONE, advertise = FALSEidle = 3600, replicate csrp = none, vlan = ALL, pending = 30, layer 4max parse len = 2000, persist rebalance = TRUEssl sticky offset = 0, length = 32conns = 0, total conns = 11Default policy:server farm = WEB, backup = <not assigned>sticky: timer = 0, subnet = 0.0.0.0, group id = 0Policy Tot matches Client pkts Server pkts-----------------------------------------------------(default) 11 58 38These examples show the output of the various show commands on the SSL daughter card:
SSL-DC# show ssl-proxy service ssltermService id: 4, bound_service_id: 260Virtual IP: 172.16.14.182, port: 443 (secondary configured)Server IP: 10.90.14.182, port: 80rsa-general-purpose certificate trustpoint: certs-keyCertificate chain in graceful rollover, being renewed:Certificate:Key Label: RSAKEY, 1024-bit, not exportableKey Timestamp: 02:03:11 UTC Aug 19 2004Serial Number: 1A65Root CA Certificate:Serial Number: 00Service certificate in graceful rolloverAdmin Status: upOperation Status: upSSL-DC# show ssl-proxy statsTCP Statistics:Conns initiated : 12 Conns accepted : 12Conns established : 24 Conns dropped : 12Conns Allocated : 12 Conns Deallocated : 12Conns closed : 24 SYN timeouts : 0Idle timeouts : 0 Total pkts sent : 129Data packets sent : 59 Data bytes sent : 23001Total Pkts rcvd : 146 Pkts rcvd in seq : 57Bytes rcvd in seq : 9826SSL Statistics:conns attempted : 12 conns completed : 12full handshakes : 10 resumed handshakes : 2active conns : 0 active sessions : 0renegs attempted : 0 conns in reneg : 0handshake failures : 0 data failures : 0fatal alerts rcvd : 0 fatal alerts sent : 0no-cipher alerts : 0 ver mismatch alerts : 0no-compress alerts : 0 bad macs received : 0pad errors : 0 session fails : 0FDU Statistics:IP Frag Drops : 0 IP Version Drops : 0IP Addr Discards : 0 Serv_Id Drops : 2Conn Id Drops : 0 Bound Conn Drops : 0Vlan Id Drops : 0 TCP Checksum Drops : 0Hash Full Drops : 0 Hash Alloc Fails : 0Flow Creates : 24 Flow Deletes : 24Conn Id allocs : 12 Conn Id deallocs : 12Tagged Pkts Drops : 0 Non-Tagg Pkts Drops : 0Add ipcs : 7 Delete ipcs : 0Disable ipcs : 6 Enable ipcs : 0Unsolicited ipcs : 3579 Duplicate Add ipcs : 0IOS Broadcast Pkts : 17881 IOS Unicast Pkts : 31780IOS Multicast Pkts : 0 IOS Total Pkts : 49661IOS Congest Drops : 0 SYN Discards : 0CSM-S and SSLM Configuration Example (Router Mode, Server NAT)
This section scales the previous CSM-S configuration "SSL Configuration Examples" by adding a SSL Services Module (SSLM) to the design. The SSLM is added using the same VLAN and IP network as the SSL daughter card. The CMS-S will use weighted round robin to load balance traffic between the SSLM and SSL-DC. Since the SSLM is approximately three times faster than the SSL daughter card weighted round robin is needed to spread the traffic across SSL off loaders according to the performance of the SSL off loader. The CSM-S applies SSL sticky to the client connections to ensure the same SSL session continue to use the same SSL off loader for the duration of the SSL session. In this example the duration is thirty minutes.
In this example, the SSL Services Module is added to the previous CSM-S configuration. The SSL Services Module will accept client connections on the same network as the SSL daughter card. (See Figure B-3.)Figure B-3 Configuration Example—CSM-S and SSLM Router Mode, Server NAT
The following address is configured on the SSL Service Module:
•ssl-proxy service virtual of 172.16.14.10:443 and a server IP of 10.90.14.182:80
•VLAN 14 with IP address 172.16.14.246, a route for client traffic to the CSM-S VLAN interface, and a gateway of 172.16.14.254 for routing administrative traffic.
Along with he SSL Service Module configuration the MSFC must be configured to allow VLAN 14 traffic to pass to the SSL Service Module.
This example creates the Layer 2 and Layer 3 VLANs on the Cat6k MSFC:
Cat6k# configure terminalEnter configuration commands, one per line. End with CNTL/Z.Cat6k(config)# ssl-proxy module 6 allowed-vlan 14This example shows how to add the SSL Service Module to the CSM-S.Cat6k(config-slb-vlan-server)# real SSLMCat6k(config-slb-module-real)# address 172.16.14.10Cat6k(config-slb-module-real)# inserviceCat6k(config-slb-module-real)# inserviceThis example shows how to add the SSLM real to the server farm of SSL off loaders and configure the weights for each real:
Cat6k(config-slb-module-real)# serverfarm SSLOFFLOADERSCat6k(config-slb-sfarm)# real 172.16.14.182 localCat6k(config-slb-sfarm)# weight 1Cat6k(config-slb-real)# inserviceCat6k(config-slb-sfarm)# real name SSLMCat6k(config-slb-sfarm)# weight 3Cat6k(config-slb-real)# inserviceThis example shows how to configure the CSM-S virtual server to apply SSL sticky for thirty minute sessions and use an SSL Session ID offset (SSL sticky sticky 10 ssl timeout 30).
Cat6k(config-slb-real)# vserver SSLTERMINATIONCat6k(config-slb-vserver)# sticky 30 group 10Cat6k(config-slb-vserver)# ssl-sticky offset 20 length 6This example shows how to configure the SSL Service Module to communicate with the CSM-S over VLAN 14 for client traffic and administrative traffic:
SSLM# configure terminalEnter configuration commands, one per line. End with CNTL/Z.SSLM(config)# ssl-proxy vlan 14SSLM(config-vlan)# ipaddr 172.16.14.246 255.255.255.0SSLM(config-vlan)# gateway 172.16.14.254SSLM(config-vlan)# route 10.90.14.0 255.255.255.0 gateway 172.16.14.1SSLM(config-vlan)# admin
Note The gateway command is required for routing administrative communication. The router defined only effects traffic destined for the VLAN IP address (TELNET, SSH, and so on...)
The route statement is required to route traffic back to the CSM-S alias IP when the SSL Daughter Card is receiving encrypted traffic on one network and sending decrypted traffic to a different Ip network.
To complete the configuration, enter the ssl-proxy service command to create a new service on the SSL daughter card (sslterm). This example shows how to configure a virtual IP address that matches the virtual server created on the CSM-S. (This virtual IP address is configured with the secondary keyword so that the SSL daughter card does not reply to ARP requests for this IP address. This is also a requirement for bridging network designs) The service is configured to send decrypted traffic back to the CSM-S while performing NAT on the destination address:
SSLM(config)# ssl-proxy service ssltermSSLM(config-ssl-proxy)# virtual ipaddr 172.16.14.10 protocol tcp port 443SSLM(config-ssl-proxy)# server ipaddr 10.90.14.182 protocol tcp port 80SSLM(config-ssl-proxy)# certificate rsa general-purpose trustpoint certs-key*Aug 24 01:40:17.581: %STE-6-PKI_SERVICE_CERT_INSTALL: Proxy: sslterm, Trustpoint: certs-key, Key: RSAKEY, Serial#: 1C2B, Index: 2*Aug 24 01:40:27.637: %STE-6-PKI_SERVICE_CERT_DELETE: Proxy: , Trustpoint: certs-key, Key: RSAKEY, Serial#: 1C2B, Index: 0SSLM(config-ssl-proxy)# inservice*Aug 24 01:40:34.165: %STE-5-UPDOWN: ssl-proxy service sslterm changed state to UPSSLM(config-ssl-proxy)# exitCat6k# show mod csm 5 realreal server farm weight state conns/hits-------------------------------------------------------------------------SSLM SSLOFFLOADERS 3 OPERATIONAL 0172.16.14.182 SSLOFFLOADERS 1 OPERATIONAL 0LINUX WEB 8 OPERATIONAL 0SUN WEB 8 OPERATIONAL 0WIN2K WEB 8 OPERATIONAL 0Cat6k# show mod csm 5 vserver detailSSLTERMINATION, type = SLB, state = OPERATIONAL, v_index = 22virtual = 10.90.14.182/32:443 bidir, TCP, service = NONE, advertise = FALSEidle = 3600, replicate csrp = none, vlan = ALL, pending = 30, layer 7max parse len = 2000, persist rebalance = TRUEssl sticky offset = 20, length = 6conns = 0, total conns = 12Default policy:server farm = SSLOFFLOADERS, backup = <not assigned>sticky: timer = 30, subnet = 0.0.0.0, group id = 10Policy Tot matches Client pkts Server pkts-----------------------------------------------------(default) 12 135 96WEBSERVERS, type = SLB, state = OPERATIONAL, v_index = 23virtual = 10.90.14.182/32:80 bidir, TCP, service = NONE, advertise = FALSEidle = 3600, replicate csrp = none, vlan = ALL, pending = 30, layer 4max parse len = 2000, persist rebalance = TRUEssl sticky offset = 0, length = 32conns = 0, total conns = 12Default policy:server farm = WEB, backup = <not assigned>sticky: timer = 0, subnet = 0.0.0.0, group id = 0Policy Tot matches Client pkts Server pkts-----------------------------------------------------(default) 12 75 67Cat6k# show mod csm 5 stickygroup sticky-data real timeout----------------------------------------------------------------10 ssl ADB70000:000DBCAF 172.16.14.182 168010 ssl A03F0000:00602F30 172.16.14.10 1596These examples show the output of the various show commands on the SSL Services Module:
SSLM# show ssl-proxy service ssltermService id: 1, bound_service_id: 257Virtual IP: 172.16.14.10, port: 443Server IP: 10.90.14.182, port: 80rsa-general-purpose certificate trustpoint: certs-keyCertificate chain for new connections:Certificate:Key Label: RSAKEY, 1024-bit, exportableKey Timestamp: 13:12:48 UTC Aug 23 2004Serial Number: 1C2BRoot CA Certificate:Serial Number: 00Certificate chain completeAdmin Status: upOperation Status: upSSLM# show ssl-proxy statsTCP Statistics:Conns initiated : 14 Conns accepted : 14Conns established : 28 Conns dropped : 10Conns Allocated : 14 Conns Deallocated : 14Conns closed : 28 SYN timeouts : 0Idle timeouts : 0 Total pkts sent : 181Data packets sent : 90 Data bytes sent : 47214Total Pkts rcvd : 196 Pkts rcvd in seq : 85Bytes rcvd in seq : 32480SSL Statistics:conns attempted : 14 conns completed : 14full handshakes : 11 resumed handshakes : 3active conns : 0 active sessions : 0renegs attempted : 0 conns in reneg : 0handshake failures : 0 data failures : 0fatal alerts rcvd : 0 fatal alerts sent : 0no-cipher alerts : 0 ver mismatch alerts : 0no-compress alerts : 0 bad macs received : 0pad errors : 0 session fails : 0FDU Statistics:IP Frag Drops : 0 IP Version Drops : 0IP Addr Discards : 0 Serv_Id Drops : 0Conn Id Drops : 0 Bound Conn Drops : 0Vlan Id Drops : 0 TCP Checksum Drops : 1Hash Full Drops : 0 Hash Alloc Fails : 0Flow Creates : 28 Flow Deletes : 28Conn Id allocs : 14 Conn Id deallocs : 14Tagged Pkts Drops : 0 Non-Tagg Pkts Drops : 0Add ipcs : 2 Delete ipcs : 0Disable ipcs : 1 Enable ipcs : 0Unsolicited ipcs : 0 Duplicate Add ipcs : 0IOS Broadcast Pkts : 68857 IOS Unicast Pkts : 293IOS Multicast Pkts : 0 IOS Total Pkts : 69150IOS Congest Drops : 0 SYN Discards : 0Integrated Secure Content-Switching Service Example
Configuring an integrated secure content-switching service (using a content switching module [CSM] as a server load balancer) with backend encryption has all the benefits of load-balancing and content switching, while securing data with full SSL coverage as it traverses paths of vulnerability.
As shown in Figure B-4, an integrated secure content-switching service configuration involves five processing steps:
1. The CSM load balances the SSL traffic, based on either load-balancing rules or using the SSL sticky feature (see the "Configuring Session Persistence (Stickiness)" section for information on configuring sticky connections), to an SSL daughter card.
2. The SSL daughter card terminates the SSL session, decrypts the SSL traffic into clear text traffic, and forwards the traffic back to the CSM.
3. The CSM content-switches the clear text traffic to the SSL daughter card again for encryption to SSL traffic.
4. The SSL daughter card forwards the encrypted SSL traffic to the CSM.
5. The CSM forwards the SSL traffic to the HTTPS server.
Figure B-4 Backend Encryption Example—Integrated Secure Content-Switching Service
Configuring the CSM
This example shows how to configure the VLANs on the CSM. VLAN 24 is the VLAN through which client traffic arrives. VLAN 35 is the VLAN between the SSL daughter card and the CSM.
Router# confure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)# module ContentSwitchingModule 6Router(config-module-csm)# vlan 24 clientRoute(config-slb-vlan-client)# ip address 24.24.24.24 255.0.0.0Route(config-slb-vlan-client)# vlan 35 serverRoute(config-slb-vlan-server)# ip address 35.35.35.35 255.0.0.0Route(config-slb-vlan-server)# route 36.0.0.0 255.0.0.0 gateway 35.200.200.3This example shows how to configure the URL policy for Layer 7 parsing:
Route(config-slb-vlan-server)# map URL urlRouter(config-slb-map-url)# match protocol http method GET url /*This example shows how to create server farms:
Router(config-slb-map-url)# serverfarm SSLCARDSRouter(config-slb-sfarm)# real 35.200.200.101 localRouter(config-slb-real)# inserviceRouter(config-slb-real)# serverfarm VLAN36REALSRouter(config-slb-sfarm)# real 36.200.200.14Router(config-slb-real)# inserviceRouter(config-slb-real)# real 36.200.200.5Router(config-slb-real)# inserviceThis example shows how to create the virtual servers:
Router(config-slb-real)# vserver LB-HTTP-SSLMODSRouter(config-slb-vserver)# virtual 35.35.35.25 tcp 81Router(config-slb-vserver)# vlan 35Router(config-slb-vserver)# slb-policy URLRouter(config-slb-vserver)# inserviceRouter(config-slb-vserver)# vserver LB-SSL-SSLMODSRouter(config-slb-vserver)# virtual 24.24.24.25 tcp httpsRouter(config-slb-vserver)# serverfarm SSLCARDSRouter(config-slb-vserver)# inserviceThis example shows how to display the status of the real servers and virtual servers:
Router# sh module contentSwitchingModule all reals---------------------- CSM in slot 6 ----------------------real server farm weight state conns/hits-------------------------------------------------------------------------35.200.200.101 SSLCARDS 8 OPERATIONAL 036.200.200.14 VLAN36REALS 8 OPERATIONAL 036.200.200.5 VLAN36REALS 8 OPERATIONAL 0Router# sh module contentSwitchingModule all vservers---------------------- CSM in slot 6 ----------------------vserver type prot virtual vlan state conns---------------------------------------------------------------------------LB-HTTP-SSLMODS SLB TCP 35.35.35.25/32:81 35 OPERATIONAL 0LB-SSL-SSLMODS SLB TCP 24.24.24.25/32:443 ALL OPERATIONAL 0Configuring the SSL Daughter Card
This example shows how to create the VLAN between the SSL daughter card and the CSM:
ssl-proxy(config)# ssl-proxy vlan 35ssl-proxy(config-vlan)# ipaddr 35.200.200.3 255.0.0.0ssl-proxy(config-vlan)# gateway 35.200.200.100ssl-proxy(config-vlan)# adminThis example shows how to configure a trusted certificate authority pool on the SSL daughter card:
ssl-proxy(config-vlan)# ssl-proxy pool ca netssl-proxy(config-ca-pool)# ca trustpoint keon-rootssl-proxy(config-ca-pool)# ca trustpoint net-rootssl-proxy(config-ca-pool)# ca trustpoint TP-1024-pcks12-rootThis example shows how to configure a URL rewrite policy on the SSL daughter card:
ssl-proxy(config)# ssl-proxy policy url-rewrite frontendss(config-url-rewrite-policy)# url www.cisco.com clearport 80 sslport 443ss(config-url-rewrite-policy)# url wwwin.cisco.com clearport 80 sslport 443ss(config-url-rewrite-policy)# url wwwin.cisco.com clearport 81 sslport 443This example shows how to configure the SSL server proxy that accepts client traffic coming through the CSM. This example also shows how to configure client authentication, SSL v2.0 forwarding, and URL rewrite policy.
Note For SSL V2.0 connections, the SSL daughter card directly opens a connection to the configured server.
ssl-proxy(config-ca-pool)# ssl-proxy service frontendssl-proxy(config-ssl-proxy)# virtual ipaddr 35.200.200.101 protocol tcp port 443 secondaryssl-proxy(config-ssl-proxy)# server ipaddr 35.35.35.25 protocol tcp port 81ssl-proxy(config-ssl-proxy)# server ipaddr 35.200.200.14 protocol tcp port 443 sslv2ssl-proxy(config-ssl-proxy)# certificate rsa general-purpose trustpoint TP-1024-pkcs12ssl-proxy(config-ssl-proxy)# policy url-rewrite frontendssl-proxy(config-ssl-proxy)# trusted-ca netssl-proxy(config-ssl-proxy)# authenticate verify allssl-proxy(config-ssl-proxy)# inserviceThis example shows how to configure the SSL client proxy that accepts clear text traffic from the CSM after the traffic completes Layer 7 parsing and decides the real server. This example also shows how to configure client certificates and a wildcard proxy.
Note The gateway address (35.200.200.125) is the address through which the real servers (36.200.200.14 and 36.200.200.5) are reached.
ssl-proxy(config-ssl-proxy)# ssl-proxy service wildcard clientssl-proxy(config-ssl-proxy)# virtual ipaddr 0.0.0.0 0.0.0.0 protocol tcp port 81 secondaryssl-proxy(config-ssl-proxy)# server ipaddr 35.200.200.125 protocol tcp port 443ssl-proxy(config-ssl-proxy)# certificate rsa general-purpose trustpoint client-certssl-proxy(config-ssl-proxy)# no nat serverssl-proxy(config-ssl-proxy)# trusted-ca netssl-proxy(config-ssl-proxy)# authenticate verify allssl-proxy(config-ssl-proxy)# inservicessl-proxy(config-ssl-proxy)# ^ZThis example shows how to display the status of the SSL server proxy service:
ssl-proxy# show ssl-proxy service frontendService id: 2, bound_service_id: 258Virtual IP: 35.200.200.101, port: 443Server IP: 35.35.35.25, port: 81SSLv2 IP: 35.200.200.14, port: 443URL Rewrite Policy: frontendCertificate authority pool: netCA pool completersa-general-purpose certificate trustpoint: TP-1024-pkcs12Certificate chain for new connections:Certificate:Key Label: TP-1024-pkcs12, 1024-bit, not exportableKey Timestamp: 22:53:16 UTC Mar 14 2003Serial Number: 3C2CD2330001000000DBRoot CA Certificate:Serial Number: 313AD6510D25ABAE4626E96305511AC4Certificate chain completeCertificate authentication type: All attributes (like CRL) are verifiedAdmin Status: upOperation Status: upssl-proxy#This example shows how to display the status of the SSL client proxy service:
ssl-proxy# show ssl-proxy service wildcardService id: 267, bound_service_id: 11Virtual IP: 0.0.0.0, port: 81 (secondary configured)Virtual IP mask: 0.0.0.0Server IP: 35.200.200.125, port: 443Certificate authority pool: netCA pool completersa-general-purpose certificate trustpoint: client-certCertificate chain for new connections:Certificate:Key Label: client-cert, 1024-bit, not exportableKey Timestamp: 18:42:01 UTC Jul 14 2003Serial Number: 04Root CA Certificate:Serial Number: 01Certificate chain completeCertificate authentication type: All attributes (like CRL) are verifiedAdmin Status: upOperation Status: upssl-proxy#Certificate Security Attribute-Based Access Control Examples
Certificate security attribute-based access control adds fields to the certificate that allow specifying an access control list (ACL) to create a certificate-based ACL.
For information on configuring certificate security attribute-based access control, refer to Certificate Security Attribute-Based Access Control at this URL:
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft/122t/122t15/ftcrtacl.htm
This example shows that the SSL connections for the SSL proxy service "ssl-offload" are successful only if the subject-name of the client certificate contains the domain name .cisco.com:
ssl-proxy(config)# ssl-proxy service ssl-offloadssl-proxy(config-ssl-proxy)# virtual ipaddr 8.100.100.126 protocol tcp port 443 secondaryssl-proxy(config-ssl-proxy)# server ipaddr 191.162.2.8 protocol tcp port 80ssl-proxy(config-ssl-proxy)# certificate rsa general-purpose trustpoint certssl-proxy(config-ssl-proxy)# nat client client-natssl-proxy(config-ssl-proxy)# trusted-ca root-cassl-proxy(config-ssl-proxy)# authenticate verify allssl-proxy(config-ssl-proxy)# inservicessl-proxy(config-ssl-proxy)# exitssl-proxy(config)#ssl-proxy(config)# ssl-proxy pool ca root-cassl-proxy(config-ca-pool)# ca trustpoint rootssl-proxy(config-ca-pool)# exitssl-proxy(config)#ssl-proxy(config)# crypto ca trustpoint rootssl-proxy(ca-trustpoint)# enrollment mode rassl-proxy(ca-trustpoint)# enrollment terminalssl-proxy(ca-trustpoint)# crl optionalssl-proxy(ca-trustpoint)# match certificate aclssl-proxy(ca-trustpoint)# exitssl-proxy(config)#ssl-proxy(config)# crypto ca certificate map acl 10ssl-proxy(ca-certificate-map)# subject-name co .cisco.comssl-proxy(ca-certificate-map)# exitThis example shows that the certificate ACLs are configured so that SSL connections for the proxy service "ssl-offload" are successful for the following conditions:
•The subject-name of the client certificate contains ste3-server.cisco.com or ste2-server.cisco.com.
•The valid-start of the client certificate is greater than or equal to 30th Jul 2003.
•The expiration date of the client certificate is less than 1st Jan 2007.
•The issuer-name of the client certificate contains the string "certificate manager."
ssl-proxy(config)# ssl-proxy service ssl-offloadssl-proxy(config-ssl-proxy)# virtual ipaddr 8.100.100.126 protocol tcp port 443 secondaryssl-proxy(config-ssl-proxy)# server ipaddr 191.162.2.8 protocol tcp port 80ssl-proxy(config-ssl-proxy)# certificate rsa general-purpose trustpoint certssl-proxy(config-ssl-proxy)# nat client client-natssl-proxy(config-ssl-proxy)# trusted-ca root-cassl-proxy(config-ssl-proxy)# authenticate verify allssl-proxy(config-ssl-proxy)# inservicessl-proxy(config-ssl-proxy)# exitssl-proxy(config)#ssl-proxy(config)# ssl-proxy pool ca root-cassl-proxy(config-ca-pool)# ca trustpoint rootssl-proxy(config-ca-pool)# exitssl-proxy(config)#ssl-proxy(config)# crypto ca trustpoint rootssl-proxy(ca-trustpoint)# enrollment mode rassl-proxy(ca-trustpoint)# enrollment terminalssl-proxy(ca-trustpoint)# crl optionalssl-proxy(ca-trustpoint)# match certificate aclssl-proxy(ca-trustpoint)# exitssl-proxy(config)#ssl-proxy(config)# crypto ca certificate map acl 10ssl-proxy(ca-certificate-map)# subject-name co ste3-server.cisco.comssl-proxy(ca-certificate-map)# valid-start ge Jul 30 2003 00:00:00 UTCssl-proxy(ca-certificate-map)# expires-on lt Jan 01 2007 00:00:00 UTCssl-proxy(ca-certificate-map)# issuer-name co certificate managerssl-proxy(ca-certificate-map)# exitssl-proxy(config)#ssl-proxy(config)# crypto ca certificate map acl 20ssl-proxy(ca-certificate-map)# subject-name co ste2-server.cisco.comssl-proxy(ca-certificate-map)# expires-on lt Jan 01 2007 00:00:00 UTCssl-proxy(ca-certificate-map)# issuer-name co certificate managerssl-proxy(ca-certificate-map)# valid-start ge Jul 30 2003 00:00:00 UTCssl-proxy(ca-certificate-map)# exitThis example shows that the server certificate is checked for the domain name in the certificate field. SSL initiation is successful only if the subject-name of the server certificate contains the domain name .cisco.com.
ssl-proxy# configure terminalEnter configuration commands, one per line. End with CNTL/Z.ssl-proxy(config)# ssl-proxy service ssl-initiation clientssl-proxy(config-ssl-proxy)# virtual ipaddr 8.100.100.126 protocol tcp port 81ssl-proxy(config-ssl-proxy)# server ipaddr 191.162.2.8 protocol tcp port 443 secondaryssl-proxy(config-ssl-proxy)# nat client client-natssl-proxy(config-ssl-proxy)# trusted-ca rootssl-proxy(config-ssl-proxy)# authenticate verify allssl-proxy(config-ssl-proxy)# inservicessl-proxy(config-ssl-proxy)# exitssl-proxy(config)#ssl-proxy(config)# ssl-proxy pool ca root-cassl-proxy(config-ca-pool)# ca trustpoint rootssl-proxy(config-ca-pool)# exitssl-proxy(config)#ssl-proxy(config)# crypto ca trustpoint rootssl-proxy(ca-trustpoint)# enrollment mode rassl-proxy(ca-trustpoint)# enrollment terminalssl-proxy(ca-trustpoint)# crl optionalssl-proxy(ca-trustpoint)# match certificate aclssl-proxy(ca-trustpoint)# exitssl-proxy(config)#ssl-proxy(config)# crypto ca certificate map acl 10ssl-proxy(ca-certificate-map)# subject-name co .cisco.comssl-proxy(ca-certificate-map)# exitssl-proxy(config)#HTTP Header Insertion Examples
The following examples show how to insert various HTTP headers and how to display header insertion statistics.
Example 1
This example shows how to insert custom headers, client IP address and TCP port number information, and a prefix string in HTTP requests sent to the server:
ssl-proxy# configure terminalEnter configuration commands, one per line. End with CNTL/Z.ssl-proxy(config)# ssl-proxy policy http-header ssl-offloadssl-proxy(config-http-header-policy)# custom "SOFTWARE VERSION :2.1(1)"ssl-proxy(config-http-header-policy)# custom "module :SSL MODULE - CATALYST 6500"ssl-proxy(config-http-header-policy)# custom type-of-proxy:server_proxy_with_1024_bit_key_sizessl-proxy(config-http-header-policy)# client-ip-portssl-proxy(config-http-header-policy)# prefix SSL-OFFLOADssl-proxy(config-http-header-policy)# exitssl-proxy(config)#ssl-proxy(config)# ssl-proxy service ssl-offloadssl-proxy(config-ssl-proxy)# virtual ipaddr 8.100.100.126 protocol tcp port 443 secondaryssl-proxy(config-ssl-proxy)# server ipaddr 191.162.2.8 protocol tcp port 80ssl-proxy(config-ssl-proxy)# certificate rsa general-purpose trustpoint certssl-proxy(config-ssl-proxy)# nat client client-natssl-proxy(config-ssl-proxy)# policy http-header ssl-offloadssl-proxy(config-ssl-proxy)# inservicessl-proxy(config-ssl-proxy)# exitssl-proxy(config)# exitCustom headers and client IP address and TCP port number information are added to every HTTP request and are prefixed by the prefix string, as shown below:
SSL-OFFLOAD-Client-IP:7.100.100.1SSL-OFFLOAD-Client-Port:59008SSL-OFFLOAD-SOFTWARE VERSION :2.1(1)SSL-OFFLOAD-module :SSL MODULE - CATALYST 6500SSL-OFFLOAD-type-of-proxy:server_proxy_with_1024_bit_key_sizeThis example shows how to display header insertion information:
ssl-proxy# show ssl-proxy stats hdrHeader Insert Statistics:Session Headers Inserted :0 Custom Headers Inserted :2Session Id's Inserted :0 Client Cert. Inserted :0Client IP/Port Inserted :2No End of Hdr Detected :0 Payload no HTTP header :0Desc Alloc Failed :0 Buffer Alloc Failed :0Client Cert Errors :0 No Service :0This example shows how to display SSL statistics:
ssl-proxy# show ssl-proxy stats sslSSL Statistics:conns attempted :2 conns completed :2conns in handshake :0 conns in data :0renegs attempted :0 conns in reneg :0active sessions :0 max handshake conns :1rand bufs allocated :0 cached rand buf miss:0current device q len:0 max device q len :2sslv2 forwards :0 cert reqs processed :0fatal alerts rcvd :0 fatal alerts sent :0stale packet drops :0 service_id discards :0session reuses :0SSL3 Statistics:full handshakes :0 resumed handshakes :0handshake failures :0 data failures :0bad macs received :0 pad errors :0conns established with cipher rsa-with-rc4-128-md5 :0conns established with cipher rsa-with-rc4-128-sha :0conns established with cipher rsa-with-des-cbc-sha :0conns established with cipher rsa-with-3des-ede-cbc-sha :0TLS1 Statistics:full handshakes :1 resumed handshakes :1handshake failures :0 data failures :0bad macs received :0 pad errors :0conns established with cipher rsa-with-rc4-128-md5 :0conns established with cipher rsa-with-rc4-128-sha :2conns established with cipher rsa-with-des-cbc-sha :0conns established with cipher rsa-with-3des-ede-cbc-sha :0Example 2
This example shows how to insert session headers and a prefix string. The full session headers are added to the HTTP request when the full SSL handshake occurs. However, only the session ID is inserted when the session resumes.
ssl-proxy# configure terminalEnter configuration commands, one per line. End with CNTL/Z.ssl-proxy(config)# ssl-proxy policy http-header ssl-offloadssl-proxy(config-http-header-policy)# sessionssl-proxy(config-http-header-policy)# prefix SSL-OFFLOADssl-proxy(config-http-header-policy)# exitssl-proxy(config)#ssl-proxy(config)# ssl-proxy service ssl-offloadssl-proxy(config-ssl-proxy)# virtual ipaddr 8.100.100.126 protocol tcp port 443 secondaryssl-proxy(config-ssl-proxy)# server ipaddr 191.162.2.8 protocol tcp port 80ssl-proxy(config-ssl-proxy)# certificate rsa general-purpose trustpoint certssl-proxy(config-ssl-proxy)# nat client client-natssl-proxy(config-ssl-proxy)# policy http-header ssl-offloadssl-proxy(config-ssl-proxy)# inservicessl-proxy(config-ssl-proxy)# exitssl-proxy(config)# exitFor the full SSL handshake, the session headers, prefixed by the prefix string, are added to the HTTP request as shown below:
SSL-OFFLOAD-Session-Id:33:FF:2C:2D:25:15:3C:50:56:AB:FA:5A:81:0A:EC:E9:00:00:0A:03:00:60:2F:30:9C:2F:CD:56:2B:91:F2:FFSSL-OFFLOAD-Session-Cipher-Name:RC4-SHASSL-OFFLOAD-Session-Cipher-Key-Size:128SSL-OFFLOAD-Session-Cipher-Use-Size:128When the session resumes, only the session ID is inserted:
SSL-OFFLOAD-Session-Id:33:FF:2C:2D:25:15:3C:50:56:AB:FA:5A:81:0A:EC:E9:00:00:0A:03:00:60:2F:30:9C:2F:CD:56:2B:91:F2:FFThis example shows how to display header insertion information:
ssl-proxy# show ssl-proxy stats hdrHeader Insert Statistics:Session Headers Inserted :1 Custom Headers Inserted :0Session Id's Inserted :2 Client Cert. Inserted :0Client IP/Port Inserted :0No End of Hdr Detected :0 Payload no HTTP header :0Desc Alloc Failed :0 Buffer Alloc Failed :0Client Cert Errors :0 No Service :0This example shows how to display SSL statistics:
ssl-proxy# show ssl-proxy stats sslSSL Statistics:conns attempted :2 conns completed :2conns in handshake :0 conns in data :0renegs attempted :0 conns in reneg :0active sessions :0 max handshake conns :1rand bufs allocated :0 cached rand buf miss:0current device q len:0 max device q len :2sslv2 forwards :0 cert reqs processed :0fatal alerts rcvd :0 fatal alerts sent :0stale packet drops :0 service_id discards :0session reuses :0SSL3 Statistics:full handshakes :0 resumed handshakes :0handshake failures :0 data failures :0bad macs received :0 pad errors :0conns established with cipher rsa-with-rc4-128-md5 :0conns established with cipher rsa-with-rc4-128-sha :0conns established with cipher rsa-with-des-cbc-sha :0conns established with cipher rsa-with-3des-ede-cbc-sha :0TLS1 Statistics:full handshakes :1 resumed handshakes :1handshake failures :0 data failures :0bad macs received :0 pad errors :0conns established with cipher rsa-with-rc4-128-md5 :0conns established with cipher rsa-with-rc4-128-sha :2conns established with cipher rsa-with-des-cbc-sha :0conns established with cipher rsa-with-3des-ede-cbc-sha :0Example 3
This example shows how to insert the custom headers, the decoded client certificate fields, and the IP address and destination TCP port number of the client-side connection, prefixed by the prefix string. The complete decoded client certificate fields are inserted for the full SSL handshake. However, only the session ID is inserted when the SSL session resumes.
ssl-proxy# configure terminalEnter configuration commands, one per line. End with CNTL/Z.ssl-proxy(config)# ssl-proxy policy http-header ssl-offloadssl-proxy(config-http-header-policy)# custom "SOFTWARE VERSION :2.1(1)"ssl-proxy(config-http-header-policy)# custom "module :SSL MODULE - CATALYST 6500"ssl-proxy(config-http-header-policy)# custom type-of-proxy:server_proxy_with_1024_bit_key_sizessl-proxy(config-http-header-policy)# client-certssl-proxy(config-http-header-policy)# client-ip-portssl-proxy(config-http-header-policy)# prefix SSL-OFFLOADssl-proxy(config-http-header-policy)# exitssl-proxy(config)# ssl-proxy service ssl-offloadssl-proxy(config-ssl-proxy)# virtual ipaddr 8.100.100.126 protocol tcp port 443 secondaryssl-proxy(config-ssl-proxy)# server ipaddr 191.162.2.8 protocol tcp port 80ssl-proxy(config-ssl-proxy)# certificate rsa general-purpose trustpoint certssl-proxy(config-ssl-proxy)# nat client client-natssl-proxy(config-ssl-proxy)# policy http-header ssl-offloadssl-proxy(config-ssl-proxy)# trusted-ca root-cassl-proxy(config-ssl-proxy)# authenticate verify allssl-proxy(config-ssl-proxy)# inservicessl-proxy(config-ssl-proxy)# exitssl-proxy(config)# exitFor the full SSL handshake, the custom headers, the decoded client certificate fields, the IP address and destination TCP port number of the client-side connection, prefixed by the prefix string, are added to the HTTP request, as shown below:
SSL-OFFLOAD-Client-IP:7.100.100.1SSL-OFFLOAD-Client-Port:59011SSL-OFFLOAD-Session-Id:0F:61:9C:F2:E5:98:70:9D:1B:C1:EA:1D:38:F5:A1:2B:00:00:0E:03:00:60:2F:30:9C:2F:1D:7D:5A:82:30:F6SSL-OFFLOAD-SOFTWARE VERSION :2.1(1)SSL-OFFLOAD-module :SSL MODULE - CATALYST 6500SSL-OFFLOAD-type-of-proxy:server_proxy_with_1024_bit_key_sizeSSL-OFFLOAD-ClientCert-Valid:1SSL-OFFLOAD-ClientCert-Error:noneSSL-OFFLOAD-ClientCert-Fingerprint:1B:11:0F:E8:20:3F:6C:23:12:9C:76:C0:C1:C2:CC:85SSL-OFFLOAD-ClientCert-Subject-CN:aSSL-OFFLOAD-ClientCert-Issuer-CN:Certificate ManagerSSL-OFFLOAD-ClientCert-Certificate-Version:3SSL-OFFLOAD-ClientCert-Serial-Number:0F:E5SSL-OFFLOAD-ClientCert-Data-Signature-Algorithm:sha1WithRSAEncryptionSSL-OFFLOAD-ClientCert-Subject:OID.1.2.840.113549.1.9.2 = ste2-server.cisco.com +OID.2.5.4.5 = B0FFF22E, CN = a, O = CiscoSSL-OFFLOAD-ClientCert-Issuer:CN = Certificate Manager, OU = HSS, O = Cisco, L = San Jose,ST = California, C = USSSL-OFFLOAD-ClientCert-Not-Before:22:29:26 UTC Jul 30 2003SSL-OFFLOAD-ClientCert-Not-After:07:00:00 UTC Apr 27 2006SSL-OFFLOAD-ClientCert-Public-Key-Algorithm:rsaEncryptionSSL-OFFLOAD-ClientCert-RSA-Public-Key-Size:1024 bitSSL-OFFLOAD-ClientCert-RSA-Modulus-Size:1024 bitSSL-OFFLOAD-ClientCert-RSA-Modulus:B3:32:3C:5E:C9:D1:CC:76:FF:81:F6:F7:97:58:91:4D:B2:0E:C1:3A:7B:62:63:BD:5D:F6:5F:68:F0:7D:AC:C6:72:F5:72:46:7E:FD:38:D3:A2:E1:03:8B:EC:F7:C9:9A:80:C7:37:DA:F3:BE:1F:F4:5B:59:BD:52:72:94:EE:46:F5:29:A4:B3:9B:2E:4C:69:D0:11:59:F7:68:3A:D9:6E:ED:6D:54:4E:B5:A7:89:B9:45:9E:66:0B:90:0B:B1:BD:F4:C8:15:12:CD:85:13:B2:0B:FE:7E:8D:F0:D7:4A:98:BB:08:88:6E:CC:49:60:37:22:74:4D:73:1E:96:58:91SSL-OFFLOAD-ClientCert-RSA-Exponent:00:01:00:01SSL-OFFLOAD-ClientCert-X509v3-Authority-Key-Identifier:keyid=EE:EF:5B:BD:4D:CD:F5:6B:60:9D:CF:46:C2:EA:25:7B:22:A5:08:00SSL-OFFLOAD-ClientCert-X509v3-Basic-Constraints:SSL-OFFLOAD-ClientCert-Signature-Algorithm:sha1WithRSAEncryptionSSL-OFFLOAD-ClientCert-Signature:87:09:C1:F8:86:C1:15:C5:57:18:8E:B3:0D:62:E1:0F:6F:D4:9D:75:DA:5D:53:E2:C6:0B:73:99:61:BE:B0:F6:19:83:F2:E5:48:1B:D2:6C:92:83:66:B3:63:A6:58:B4:5C:0E:5D:1B:60:F9:86:AF:B3:93:07:77:16:74:4B:C5This example shows how to display header insertion information:
ssl-proxy# show ssl-proxy stats hdrHeader Insert Statistics:Session Headers Inserted :0 Custom Headers Inserted :1Session Id's Inserted :1 Client Cert. Inserted :1Client IP/Port Inserted :1No End of Hdr Detected :0 Payload no HTTP header :0Desc Alloc Failed :0 Buffer Alloc Failed :0Client Cert Errors :0 No Service :0This example shows how to display SSL statistics:
ssl-proxy# show ssl-proxy stats sslSSL Statistics:conns attempted :1 conns completed :1conns in handshake :0 conns in data :0renegs attempted :0 conns in reneg :0active sessions :0 max handshake conns :1rand bufs allocated :0 cached rand buf miss:0current device q len:0 max device q len :2sslv2 forwards :0 cert reqs processed :1fatal alerts rcvd :0 fatal alerts sent :0stale packet drops :0 service_id discards :0session reuses :0SSL3 Statistics:full handshakes :0 resumed handshakes :0handshake failures :0 data failures :0bad macs received :0 pad errors :0conns established with cipher rsa-with-rc4-128-md5 :0conns established with cipher rsa-with-rc4-128-sha :0conns established with cipher rsa-with-des-cbc-sha :0conns established with cipher rsa-with-3des-ede-cbc-sha :0TLS1 Statistics:full handshakes :1 resumed handshakes :0handshake failures :0 data failures :0bad macs received :0 pad errors :0conns established with cipher rsa-with-rc4-128-md5 :0conns established with cipher rsa-with-rc4-128-sha :0conns established with cipher rsa-with-des-cbc-sha :0conns established with cipher rsa-with-3des-ede-cbc-sha :1URL Rewrite Examples
These examples show how to configure URL rewrite depending on the desired outcome and assume the following proxy configuration:
ssl-proxy service frontendvirtual ipaddr 35.200.200.101 protocol tcp port 443 secondaryserver ipaddr 35.200.200.14 protocol tcp port 80certificate rsa general-purpose trustpoint TP-1024-pkcs12policy url-rewrite test-url-rewriteinservice!Example 1
This example shows how to configure a protocol rewrite (for example, HTTP to HTTPS) when the clear text port is a standard HTTP port 80. In this example, when the server sends the relocation string as http://ssl-136.cisco.com/index2.html, the SSL daughter card rewrites the string as https://ssl-136.cisco.com/index2.html.
To configure a protocol rewrite (HTTP to HTTPS), specify any of the following URL rewrite rules:
•
ssl-proxy policy url-rewrite test-url-rewrite
url ssl-136.cisco.com
!•
ssl-proxy policy url-rewrite test-url-rewrite
url ssl*
!•s
sl-proxy policy url-rewrite test-url-rewrite
url *com
!Example 2
This example shows how to configure a protocol rewrite (for example, HTTP to HTTPS) when the clear text port is a nonstandard HTTP port. In this example, when the server sends the relocation string as http://ssl-136.cisco.com:100/index2.html, the SSL daughter card rewrites the string as https://ssl-136.cisco.com/index2.html.
To configure a protocol rewrite (HTTP to HTTPS) with a nonstandard clear text port, specify any of the following URL rewrite rules:
•
ssl-proxy policy url-rewrite test-url-rewrite
url ssl-136.cisco.com clearport 100
!•
ssl-proxy policy url-rewrite test-url-rewrite
url ssl* clearport 100
!•
ssl-proxy policy url-rewrite test-url-rewrite
url *com clearport 100
!Example 3
This example shows how to configure a protocol rewrite and SSL port rewrite when the clear text port is a standard HTTP port 80. In this example, when the server sends the relocation string as http://ssl-136.cisco.com/index2.html, the SSL daughter card rewrites the string as https://ssl-136.cisco.com:445/index2.html.
To configure a protocol rewrite (HTTP to HTTPS) with a nonstandard SSL text port, specify any of the following URL rewrite rules:
•
ssl-proxy policy url-rewrite test-url-rewrite
url ssl-136.cisco.com sslport 445
!•
ssl-proxy policy url-rewrite test-url-rewrite
url ssl* sslport 445
!•
ssl-proxy policy url-rewrite test-url-rewrite
url *com sslport 445
!Example 4
This example shows how to configure a protocol rewrite and SSL port rewrite when the clear text port is nonstandard. In this example, when the server sends the relocation string as http://ssl-136.cisco.com:100/index2.html, the SSL daughter card rewrites the string as https://ssl-136.cisco.com:445/index2.html.
To configure a protocol rewrite and SSL port rewrite with a nonstandard clear text port, specify any of the following URL rewrite rules:
•
ssl-proxy policy url-rewrite test-url-rewrite
url ssl-136.cisco.com clearport 100 sslport 445
!•
ssl-proxy policy url-rewrite test-url-rewrite
url ssl* clearport 100 sslport 445
!•
ssl-proxy policy url-rewrite test-url-rewrite
url *com clearport 100 sslport 445
!This example displays the above URL rewrite policy:
ssl-proxy# show ssl-proxy policy url-rewrite test-url-rewriteRule URL Clearport SSLport1 *com 100 445SSL proxy services using this policy:frontendUsage count of this policy:1ssl-proxy#