Forum Discussion

Bill_Baker's avatar
Bill_Baker
Icon for Nimbostratus rankNimbostratus
Jun 28, 2016

iRule with Performance (layer 4) and protocols set to "all"

So I have an LDAP VIP set as Performance (layer 4) and protocols set to "all" listening on all ports.

 

I've been asked for stats on client IP addresses. I've done request logging in iRules before, but I'm not sure what's available if "all" protocols is set. After doing a quick trace, I do see at least 1 client hitting the Kerberos port on UDP. :(

 

Is Client_connected available? If so, how about LB_Selected?

 

I really only need the client IP, and what port/proto they are hitting so I should be able to use client_connected, but as long as I'm going down this road, I may as well get my learn-on...

 

Thanks, Bill

 

2 Replies

  • bwolmarans_1284's avatar
    bwolmarans_1284
    Historic F5 Account

    yes, I think so.

    irule:

    when CLIENT_ACCEPTED {
     log [IP::client_addr]
    }
    

    config:

    ltm virtual /Common/l4_devcentral_test {
        destination /Common/10.10.20.174:0
        mask 255.255.255.255
        pool /Common/http_pool
        profiles {
            /Common/fastL4 { }
        }
        rules {
            /Common/l4_devcentral_test
        }
        source 0.0.0.0/0
        source-address-translation {
            type automap
        }
        translate-address enabled
        translate-port disabled
    }
    
    • Bill_Baker's avatar
      Bill_Baker
      Icon for Nimbostratus rankNimbostratus
      Thanks. I'm actually looking for server side data as well. Which port is the client hitting as well. That's the part I'm not so sure about. If I'm looking for a port, I'm pretty sure I have to either look for TCP::local_port, or UDP::local_port.