Forum Discussion
yuanqiang_22112
Nimbostratus
Jul 13, 2016Irules for tcp option
scenario: F5 to load balance for mysql database,f5 set the automap function,The user needs to see the client's real IP ;
solove : I create the irules to insert client true ip ,but when I ...
Hamish
Cirrocumulus
Jul 13, 2016Hi.
Looks to me like you're using the wrong example code. If I read your description correctly, you want to INSERT the client IP into the connection so the backend (mysql) can read it? However you're using the example iRule that GETS the option28 information and displays it on the client-side of the connection.
The code to SET the option is documented as
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
}You still have to get mysql to read and process that inserted option information of course.
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