Forum Discussion

Mubi's avatar
Mubi
Icon for Cirrus rankCirrus
Nov 07, 2019

How to Preserve Source IP in non HTTP/HTTPS TCP Virtual Server

Our Customer has the demand that they want the Source IP address of Client who want to access one of their Application which is non HTTP/HTTPs , mean while i have follow different threads of Devcentral and prepare the below irule.

But still i am unable to preserve Client IP as Customer server didn't receive Source IP in the request from F5.

 

when CLIENT_ACCEPTED {

 set opt28 [TCP::option get 28]

 if { [string length $opt28] == 5 } {

binary scan $opt c ver

if { $ver != 1 } {

log local0. "Unsupported Akamai version: $ver"

} else {

set optaddr [IP::addr parse $opt28 1]

}

 }

 }

 

when SERVER_CONNECTED {

  scan [IP::client_addr] {%d.%d.%d.%d} a b c d

  TCP::option set 29 [binary format cccc $a $b $c $d] all

}