Forum Discussion

dave_jensen_201's avatar
dave_jensen_201
Icon for Nimbostratus rankNimbostratus
Mar 23, 2010

iRule to log browser type (client)

I've got a thread running on Adv. Config about an issue I'm having with SSL connections and Apple Safari for a website we host. I'm looking to track down the behavior of the F5 when a connection request comes through the F5 but am having trouble in a few areas. First I'd like to log the ssl sessionid but none of my iRules that I'm trying ever get executed.

 

NEW

 

when CLIENT_ACCEPTED {

 

log local0. "SSL sessionid is: [SSL::sessionid]"

 

}

 

NEW

 

when HTTP_REQUEST {

 

log local0. "SSL sessionid is: [SSL::sessionid]"

 

}

 

NEW

 

when SERVER_CONNECTED {

 

log local0. "SSL sessionid is: [SSL::sessionid]"

 

}

 

 

As for logging a client browser type I don't know where to start as the list of events and what to log tell me this isn't possible (but I hope I'm wrong).

 

 

Thanks,

 

 

- Dave

6 Replies

  • For the client browser type you will want to use:

     

     

    HTTP::header User-Agent

     

     

     

     

  • Sorry, the line that you would want to add to your iRule code is:

     

     

    log local0. "The User Agent String is: [HTTP::header User-Agent]"

     

     

    I checked out your other post and left you a URL that explains how to obtain that Session ID that you are looking for.
  • when HTTP_REQUEST would be the event trigger.

     

     

    What is your level of access on the BIG-IP device you are running? I have a QA F5 for testing stuff on, but when I have to test something on the production unit, I just set up another virtual server using a private IP and utilize all the same iRules, pools and profiles of the Virtual Server that I am debugging. Then I create an entry on my windows unit's host file that aims the url to the new virtual sever that I created. Then you can send requests back and forth from your own machine, using a valid url to analyze and debug things at will.

     

     

    I had to get approved to have my own test VIP on the unit, but it can save a lot of time when troubleshooting things like this and keeps you from stepping on production traffic.
  •  

    What is your level of access on the BIG-IP device you are running? I have a QA F5 for testing stuff on, but when I have to test something on the production unit, I just set up another virtual server using a private IP and utilize all the same iRules, pools and profiles of the Virtual Server that I am debugging. Then I create an entry on my windows unit's host file that aims the url to the new virtual sever that I created. Then you can send requests back and forth from your own machine, using a valid url to analyze and debug things at will.

     

     

     

     

    This is a great option if you don't have a separate test unit. It limits the impact of errors on a test iRule affecting a live virtual server.

     

     

    Aaron