Forum Discussion

PG0581's avatar
PG0581
Icon for Cirrus rankCirrus
Dec 05, 2018

iRule to log IP/Cookie

Right now this will log the clients IP:Port and cookie values. Is there a way to make this bi-directional?

ltm rule EXAMPLE_RULE {
    when HTTP_REQUEST {
           log local0. "Client Source IP: [IP::client_addr]:[TCP::client_port] Client cookie values [HTTP::cookie names]" 
            }
}

1 Reply

  • I have it working with this:

        ltm rule Example_Rule {
        when HTTP_REQUEST {
                           log local0. "Client IP: [IP::client_addr]:[TCP::client_port] Client cookie values [HTTP::cookie names]" 
                                       }
    
    
            when HTTP_RESPONSE {
                           log local0. "Server IP: [IP::server_addr] Server cookie values [HTTP::cookie names]" 
                                       }
    }