Forum Discussion

Lazar_92526's avatar
Lazar_92526
Icon for Nimbostratus rankNimbostratus
Jun 18, 2014

UIE for Akamai True-Client-IP Header Persistence or source address persistence

All,

 

I'm looking into putting together a UIE which has an iRule that would persist to Akami's True-Client_IP if it exists and the traffic is routing from Akami. If the traffic is not from Akami, I need to persist it off of source address for 60 minutes. Trying to figure out how to piece it together.

 

**Akami request pulled from dev central *** *** Source Address persistence for 60 minutes, and is based off of calling a pre-existing source address persistence profile set to 60 minutes (source_addr_60) ***

 

**Below are the pieces I have so far, just trying to see if this is feasible.

 

when HTTP_REQUEST { set True_Client_IP [HTTP::header "True-Client-IP"] if { $True_Client_IP ne "" } { persist uie $True_Client_IP log local0. "[IP::client_addr]:[TCP::client_port]: True-Client-IP: [HTTP::header value True-Client-IP], persist record: [persist lookup uie $True_Client_IP]" } if { [persist lookup source_addr [IP::client_addr]] ne "" } { persist source_addr_60 [IP::client_addr] } }

 

2 Replies

  • Please edit your post, highlight your code, hit tab then save it again to format it correctly.
  • Can you try this?

     From: https://devcentral.f5.com/wiki/iRules.Akamai-True-Client-IP-Header-Persistence.ashx
    when HTTP_REQUEST {
        set True_Client_IP [HTTP::header "True-Client-IP"]
        if { $True_Client_IP eq "" } {
            persist source_addr 3600
        } else {
            persist uie $True_Client_IP 
            log local0. "[IP::client_addr]:[TCP::client_port]: True-Client-IP: [HTTP::header value True-Client-IP], persist record: [persist lookup uie $True_Client_IP]"
        }
    }