# iRule processing after Client SSL decryption

**URL:** <https://community.f5.com/t/irule-processing-after-client-ssl-decryption/46382>\
**Category:** Technical Forums\
**Tags:** dev, irules, devops, application-delivery\
**Created:** [January 17, 2006, 9:26pm UTC](https://community.f5.com/t/irule-processing-after-client-ssl-decryption/46382 "2006-01-17T21:26:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Bera\_92](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_Bera\_92](https://community.f5.com/u/Michael_Bera_92)\
**Post date:** [January 17, 2006, 9:26pm UTC](https://community.f5.com/t/irule-processing-after-client-ssl-decryption/46382/1 "2006-01-17T21:26:32Z")

</div>

I am attempting to configure persistence based upon the content of the data stream.

When I use unencrypted source traffic, the iRule works as expected. The iRule was configured as follows:

when CLIENT\_ACCEPTED {

TCP::collect 1

}

when CLIENT\_DATA {

log local0. “DATA= [TCP::payload length] -End”

if {[TCP::payload] contains “&u=”} {

log local0. “RD- [TCP::payload] -End”

persist uie [findstr [TCP::payload] “&con=” 5 “&”]

pool stg.us1-rd.service.gehealthcare.com.443

}

elseif {[TCP::payload length] \> 1000} {

reject

}

else {

log local0. “Collect more”

TCP::collect 1

}

return

}

When I switched the configuration to use Client side SSL, I modified the rule to:

when RULE\_INIT {

set $nCollect\_Passes 1

}

when CLIENTSSL\_HANDSHAKE {

log local0. “CLIENTSSL\_HANDSHAKE”

TCP::collect 1

}

when CLIENT\_ACCEPTED {

log local0. “Collect”

TCP::collect 1

}

when CLIENT\_DATA {

log local0. “CLNT DATA= [TCP::payload length] -End”

if {[TCP::payload] contains “&u=”} {

log local0. “RD- [TCP::payload] -End”

persist uie [findstr [TCP::payload] “&con=” 5 “&”]

pool stg.us1-rd.service.gehealthcare.com.443

}

elseif {[TCP::payload length] \> 1000} {

reject

}

elseif {$nCollect\_Passes \> 10} {

reject

}

else {

log local0. “CLNT Collect more”

incr $nCollect\_Passes

TCP::collect 1

}

return

}

This does not work because the data is encrypted. I get the log message:

Rule : PAYLOAD= ??W??? I???[??v)j??5??6b??u???@o??~??KKZ???u\???sq{???Mz???M???h??rz???}=\*|???L???z??hC?? \N???\>p??(???R?? ???u&???R`???S ??dG ???E%??

Question:

Is there a way to process the data stream after it is decrypted?

---

<div class="post-metadata">

**Author:** ![Colin\_Walker\_12](https://avatars.discourse-cdn.com/v4/letter/c/a88e4f/32.png) [@Colin\_Walker\_12](https://community.f5.com/u/Colin_Walker_12)\
**Post date:** [January 19, 2006, 11:41pm UTC](https://community.f5.com/t/irule-processing-after-client-ssl-decryption/46382/2 "2006-01-19T23:41:46Z")

</div>

The way you would do this is to configure the BIG-IP to be the SSL termination point for the connection. Once this is the case, the iRule shouldn’t have any trouble processing the data.

-Colin

---

<div class="post-metadata">

**Author:** ![unRuleY\_95363](https://avatars.discourse-cdn.com/v4/letter/u/58f4c7/32.png) [@unRuleY\_95363](https://community.f5.com/u/unRuleY_95363)\
**Post date:** [February 2, 2006, 9:43pm UTC](https://community.f5.com/t/irule-processing-after-client-ssl-decryption/46382/3 "2006-02-02T21:43:02Z")

</div>

Uh, that’s not quite true. We are investigating adding an SSL equivalent to CLIENT\_DATA.

In the meantime, you would have to create a loopback virtual and route the unencrypted traffic through the secondary virtual.
