Forum Discussion
Geoff_Littlewoo
Nimbostratus
Jul 24, 2009Use iRulke to extract X-Forwarded out of HTTP packet
I have a polling HTTP pakcet that the LTM does not see as a proper compliant HTTP packet.
Due to this the device sends a single packet in and the F5 closes the connection. This connection needs to remain open. To fix this, the HTTP profile is removed from the Virtual Server. The X-Forwarded header is needed fromn the packets that then flow through the LTM. The X-Forwarded header becomes the IP address of the LTM and not the source device.
I am looking for an iRule that will look at this packet and extract the X-Forwarded contents and send it through, as the souce address sent becomes the interface of the LTM.
14 Replies
Sort By
- Geoff_Littlewoo
Nimbostratus
Aaron, - hoolio
Cirrostratus
So it sounds like the client is making more than one HTTP request on the same TCP connection. If that happens, the HTTP profile and iRule would no longer be enabled, so the XFF header would not be inserted. That's the downside to disabling the HTTP profile. - Geoff_Littlewoo
Nimbostratus
Aaron, - hoolio
Cirrostratus
You'll need to configure a virtual server or SNAT to allow the servers to originate traffic through LTM. The best option would be to configure a virtual server which points to a pool of one or more gateways with a FastL4 profile. You may need to enable SNAT on the outbound virtual server to ensure responses go back through LTM. You should also enable the outbound virtual server only on the servers' VLAN. This will ensure that only the servers will be able to use this VIP to route through LTM.
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