Forum Discussion
Andy_O_4935
Nov 01, 2011Nimbostratus
X-Forwarded-for Header Insertion
In a lab setup, I wrote an irule to insert an X-forwarder-for header if one doesn't exist and using snat automap.
The Ip address I see on the webserver is the SNAT (floating) IP address which i...
Kurt_Knochner_5
Nov 02, 2011Cirrus
In a lab setup, I wrote an irule to insert an X-forwarder-for header if one doesn't exist and using snat automap.The Ip address I see on the webserver is the SNAT (floating) IP address which is what I'm supposed to see (using tcpdump)However, I'm not able to see the X-forwarded-for header inserted using tcpdump
Hi,
did you check /var/log/ltm for TCL errors? If there are runtime errors while your iRule executes, the header will not be replaced!
Sample iRule:
when HTTP_REQUEST {
HTTP::header replace "X-Forward-For" [IP::client_addr]
check /var/log/ltm !!
log local0. "[HTTP::request]"
}
Regards
Kurt Knochner
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