I hope everyone is doing well. We have an odd issue with traffic through our F5. Let me start by saying that SSL and session for our website works just fine through IE8/IE7, Firefox/Mozilla, Chrome, Opera.
Basically we have a number of servers in our web farm, our website establishes session in two ways, SSL session ID through the IIS/F5 where a user is bound to a server, and the session that gets created with our own application as the user logs in.
Long story short, when a user accesses our site via Safari the SSL session is not working. They are bounce around all servers making it impossible for our application session to remain. We use inproc session in our .net website (no database) and our users on Safari are having an extremely poor experience.
Any help that you can provide is appreciated. I read a post about SSL Pass Through and OneConnect being enabled at the same time causing problems with page display but these users are not having issues with page display, just session.
Let me know if you need any details and I’ll get them. I didn’t configure this LTM but I am familiar with it.
Those of you that are looking, does my problem even make sense or are you reading this and going away confused. I’m getting pressure from all angles to figure this out so your help is greatly appreciated. I’m not ready to open a ticket yet because I know you’re all so smart… =)
As a stop gap measure, can you add a fallback persistence profile of Source Address?
The question makes sense--I’m just not sure what would cause this. Maybe Safari is constantly re-negotiating the SSL session? ssldumps of a failure would help.
I’d suggest opening a case with F5 Support on this, as it will probable require analysis of your exact LTM config and tcpdumps of a few failures.
If you can, try attaching an iRule to the VS and show the [SSL::sessionid] for each request… See if it really is changing… That way you’ll know better where to focus your efforts.
I’m trying to get the iRule setup to log the SSL:sessionid logged and am running into issues. I assume that I may be told to go to the iRule forum but since it was brought up here, perhaps you all could cut me a break on this one… I’m new to iRules and I’m not sure where to start to log the SSL::sessionid. I have the Editor and I’m taking some stabs in the dark but believe am failing miserably…
You might try this iRule, line for line it matches the code in the URL that I posted, but I added the to log local0 lines so that you can check the output via your BIG-IP logs. Granted I haven’t had a chance to test it myself, but you might give it a spin and see if it works for you.
when RULE_INIT {
set allzeros [string repeat "0" 64]
}
when CLIENTSSL_CLIENTCERT {
set cert [SSL::cert 0]
set sid [SSL::sessionid]
if { $sid ne $::allzeros } {
If this SSL session will be cached, then it may be
resumed later on a new connection. Cache the cert
in the session table in case that happens. Because ID's
are not globally unique, the session id needs to be combined
with something from client address to avoid mismatch.
set key [concat [IP::remote_addr]@$sid]
session add ssl $key $cert 180
}
}
when HTTP_REQUEST {
if { [info exists cert] } {
set sn [X509::serial_number $cert]
} else {
set sid [SSL::sessionid]
We don't have a cert, possibly because this is
a new connection that was a resumption of a
previous SSL session. If that is the reason,
the cert will be in the session table.
if { $sid ne $::allzeros } {
This SSL session was resumed; retreive the cached cert
set key [concat [IP::remote_addr]@$sid]
set cert [session lookup ssl $key]
if { $cert != "" } {
set sn [X509::serial_number $cert]
} else {
dunno how this happened
reject
return
}
}
}
if { [info exists sn] } {
HTTP::header insert Serial $sn
log local0. "The User Agent String is: [HTTP::header User-Agent]"
log local0. "The Serial number is: [X509::serial_number $cert]"
} else {
no sn available, reject the client
reject
return
}
}
Forgive me for being dense, but is this ‘doing’ anything to the SSL session table or the requests. Admittedly this is a production type issue for us and I don’t expect any guarantees but from your expertise, is it effecting any change or just gathering information?
Looks like it is just an information gathering and then inserts the session into the header and with the log entries will log the user agent and session id into your LTM log file.
Am I missing something for iRules to be executed? Once an iRule is created and assigned to a partition, there isn’t anything else that needs to be done in order to apply it, is there? Once created it should execute assuming its criteria is met?
I created the iRule and the first step (RULE_INIT) executed 2 times (zero fail, zero abort), but did not execute the other two steps and therefore provided no logging. I’m missing something but I cannot see it (probably gonna feel stupid when I do and that’ll be nice)…
If you’re not decrypting the SSL, you wouldn’t want to add an HTTP profile to the VIP and therefore shouldn’t be able to add an iRule to the VIP which references HTTP events. I’d expect your first example to work. Just add it to the VIP on the resources tab and then check /var/log/ltm for the rule output.
when CLIENT_ACCEPTED {
log local0. "[IP::client_addr]:[TCP::client_port]: SSL sessionid is: [SSL::sessionid]"
}
If you have a Safari browser you can reproduce the issue with, I’d restrict the iRule to log only your client IP address:
when CLIENT_ACCEPTED {
if {[IP::addr [IP::client_addr] equals 1.1.1.1]}{
log local0. "[IP::client_addr]:[TCP::client_port]: SSL sessionid is: [SSL::sessionid]"
}
}