Forum Discussion
iRule to add Remote address in TCP header
Is it possible to add remote address in TCP header with the help of iRule, If so can someone help?
4 Replies
- uni
Altocumulus
ltm rule server-ip-header { when SERVER_CONNECTED { HTTP::header insert serveraddress [IP::server_addr] } } - sanjay_01_13396
Nimbostratus
Hi uni,
Thanks for reverting, unfortunately this is not HTTP traffic, is it possible to add the remote address in TCP header instead of HTTP header?
- uni
Altocumulus
I don't know what you mean by TCP header. If you want to modify the TCP payload, you will need to use the TCP::payload command. How you do that depends on your application and the structure of your data. Have a look at this page: https://clouddocs.f5.com/api/irules/TCP__payload.html
- Kevin_Stewart
Employee
Using TCP::payload replace may be a solution, but as Uni points out it depends on the application, its data structure, and when and where you want to insert the new data. That said, in the truest sense, the TCP::payload command really only works on payload and not actual TCP headers. To get to the TCP headers, the options fields specifically, you could use the TCP::options set command. Again though, this is all rather dependent on the data structure. If you could give us some more information it might help.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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