Forum Discussion
Robert_Luechte2
Cirrus
Aug 26, 2019Setting serverside IP address to value received in x-forwarded-for header
I have an interesting situation involving SNAT, and haven't been able to find any existing answers. There is a website that goes to a third party location first. After their processing, the ...
Lee_Sutcliffe
Nacreous
Aug 27, 2019I am providing this iRule as an example - however I'm not 100% if it work.
Firstly, you need to be confident that return traffic will be directed to the F5 as the only option to change the client IP address is to SNAT the source IP. i.e. your back end servers need to have F5 as the default gateway.
F5 should un-NAT the address for return flows but I've never done this with an IP address that isn't in the same range as a self IP on the device.
when HTTP_REQUEST {
if {[HTTP::header exists "X-Forwarded-For"]} {
snat [HTTP::header value "X-Forwarded-For"]
}
}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
