Forum Discussion

Moonotech's avatar
Icon for Nimbostratus rankNimbostratus
Mar 22, 2023

Need help to log the username and client ip address using irules


Need help on configuring an irule configuration to log the client ip address and also the username for a web application which is going through LTM.Thanks.



4 Replies

  • Hi Moonotech,

    We need more information on your current configuration for this application, do you have SSL? Does the request come from a firewall? where is the username present on the web page and what parameter use the application for store the username?

    • Moonotech's avatar
      Icon for Nimbostratus rankNimbostratus

      Hello Sebastiansierra 

      The client side is encrypted by the LTM but the the backend application does not have SSL.The user is prompted for a username and password on the web application.We want to capture the username (when its entered by the user and submitted) and also client IP address.

      Traffis flow is from the user (no firewall) through the F5 towards the backend servers (Firewall present).




  • Hi Moonotech,

    For this work you have to determine the variable where the user is located and the create the next irule:

    when HTTP_REQUEST {
    #Check if the basic auth username is present
    set user [HTTP::username]
    log local0. "Ip client [IP::client_addr] + the user is: $user"