Forum Discussion
Scot_85536
Nimbostratus
Jul 31, 2009Can't read cookie on F5 terminated SSL?
Hey everyone,
I've got a VIP that I can connect to via HTTP and HTTPS, with the BigIP terminating the SSL with a client SSL profile. Nothing set for the server SSL profile as I don't need to encrypt the last leg to the server. On that VIP I'm trying to read a cookie with an irule. I can successfully read it on http requests, but not on https requests. Am I missing something? As I understood, as long as the F5 is terminating the SSL connection I should be able to read the cookie.
I'm trying to do something simple until I get it working:
if { [HTTP::cookie exists "customcookie"]} {
log "cookie customcookie value [HTTP::cookie customcookie]"
}
Thanks!
- Scot_85536
Nimbostratus
OK, after more examination that's not my problem. it is successfully reading the cookie. But I'm not sure what my problem is? Here's what I'm doing: - hoolio
Cirrostratus
The page cannot be displayed error is generally caused by a TCP reset being sent to the client. Do you see a TCL runtime error in /var/log/ltm? Can you post the iRule you're using? Have you added a client SSL and HTTP profile to the HTTPS virtual server? - Scot_85536
Nimbostratus
I don't see any errors in the LTM log. The SSL and HTTP profiles are there and working. I can connect and browse the site successfullly when I let the load balancer select where to send my connection. The problem only comes when I try to override persistence and select where I want my connections to go. When I do that, it works fine with http. When I try https I don't even get the log entry that I've set in the irule to indicate an http response.\
- hoolio
Cirrostratus
Can you also post the ltm log from a failure? - Scot_85536
Nimbostratus
There isn't anything in the log to indicate a failure. The only thing that appears in the LTM log is the log entries that I've explicitly put in the irule. Except for the last one in the HTTP_RESPONSE. That one never appears. - Scot_85536
Nimbostratus
Let me restate that... there isn't anything appearing in the LTM log at all, except from the log entries in the irule. - hoolio
Cirrostratus
I'm just having a hard time following the exact failure scenario. It would help to see the ltm logs to see what statements in the rule are being hit. Could you also add a log statement with the client IP:port and the requested URI at the beginning of the HTTP_REQUEST event? - hoolio
Cirrostratus
Also, if the client is including the node IP and port in the query string as a parameter value, you could get the value using [URI::query [HTTP::uri] "param_name"] where param_name is the name of the parameter. If you want to get the query string, you can use HTTP::query (Click here). - Scot_85536
Nimbostratus
OK, I put these log statements right under http_request event: - Scot_85536
Nimbostratus
I added several more logging statements scattered through the rest of the irule to see how far down in the http_request event it was getting, and it seems to be stopping processing of the irule in different places, but always in the first few lines of the http_request event. I'm lost... why would it stop processing the event part way through?
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects