Forum Discussion
Cookie persistence via iRule
I am very new to this but this looks like something that might help me if anyone could assist in clarifying what I would need to do...
I have an exchange server on our LTM running 11.5.3 and it has source address persistence working great for all users with the exception of a GOOD Mobile Messaging server that apparently the vendor says only works properly using cookie persistence.
I don't want to break Exchange by changing the persistence profile for all users but was wondering if there was a way to look at the source IP of the GOOD (GMM) server and change it to a cookie persistence profile instead. Is this along the same lines as the irule in this thread?
Does this mean I could assign both persistence profiles to the exchange VS and make source address persistence the default but use an irule to associate the GMM IP to a cookie persistence profile instead?
Any help is appreciated!
- OTS02Feb 11, 2016
Cirrus
Hi Mike P. I pulled this out of a rule I am using for mobile app VS: when HTTP_REQUEST { set seshuntoken [HTTP::cookie value "SESSION_TOKEN"] if { [IP::addr [IP::client_addr] equals 10.xxx.xxx.xxx/255.255.255.255] } { if { [HTTP::cookie exists "SESSION_TOKEN"] } { if { $seshuntoken != "" } { persist uie [HTTP::cookie "SESSION_TOKEN"] } } } } - OTS02Feb 11, 2016
Cirrus
Of course, you need to know the name of the cookie that the GOOD server is using. our cookie name happens to be "SESSION_TOKEN". - OTS02Feb 11, 2016
Cirrus
Thinking about it, you probably don't even need to discriminate according to IP address, as the other clients probably will not have that cookie name. - OTS02_109465Feb 12, 2016
Nimbostratus
I should clarify - this rule is added to a "universal" persistence profile, that is applied to the said VS, which also has a "source_addr " profile as backup. - Mike_P__194875Feb 14, 2016
Nimbostratus
Thanks for all of this! I will look into doing this on a test box and see if it works the way we want to but looks like it will do what we need.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com