Forum Discussion
ScottG_33396
Nimbostratus
Nov 30, 2006get and replace
OK all you gurus. Here's what i want to do. I want to get data from http::header "X-Forwarded-For" and replace the data in client_addr with what I get from X-Forwarded-For. I need to grab th IP found in X-Forwarded-For and put it in the client_addr so that I can pass it to my ISA servers. Any ideas?
Thanks,
Scott
- hoolio
Cirrostratus
When a client makes an HTTP request, you could look at the HTTP header(s) named X-Forwarded-for and set that as the source IP address for a connection to the pool using snat . - ScottG_33396
Nimbostratus
OK, I did some seraching and came up with this iRule: - Deb_Allen_18Historic F5 AccountI think what Aaron is suggesting is using the SNAT command to change the source IP to the value of the XFF header:
Interesting idea. If default routing will ensure an appropriate return path, it may work, but could instead result in broken conversations if the source NAT is in place to force return through a specific upstream device.when HTTP_REQUEST { snat [HTTP::header "X-Forwarded-For"] }
- ScottG_33396
Nimbostratus
Deb, thanks for the help. When I try to use snat in that context, I get: - ScottG_33396
Nimbostratus
Deb, forget my last. I'm bonehead. I tried to name the new iRule SNAT. Duh!
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