Forum Discussion
Mathew_Loesch
Nimbostratus
Jun 13, 2014Insert client IP into tcp payload
I have been searching the boards for weeks. I have communicated with about a dozen peers. None of us can figure out how to insert the client IP address into the tcp payload. My customer wants the ...
Wangzixuan_3147
Nimbostratus
May 22, 2018when CLIENT_ACCEPTED {
TCP::collect
}
when CLIENT_DATA {
set ippayload [IP::remote_addr]
set newip "\!IP=$ippayload\!"
set oldpayload [TCP::payload]
set newpayload "$oldpayload$newip"
TCP::payload replace 0 [TCP::payload length] ""
TCP::payload replace 0 0 $newpayload
log local0. "newpayload is:[TCP::payload]"
TCP::release
}
The test results
May 22 01:21:39 bigip1 info tmm1[10405]: Rule /Common/tcp_payload_1 : newpayload is:GET /~img27 HTTP/1.1 Accept: image/png, image/svg+xml, image/jxr, image/*;q=0.8, /;q=0.5 Referer: http://10.128.10.123/ Accept-Language: zh-CN User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko Accept-Encoding: gzip, deflate Host: 10.128.10.123 Connection: Keep-Alive !IP=10.128.10.1!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
