Forum Discussion
lardyboy_lardyb
Nimbostratus
Dec 15, 2004inserting client ip address into header when using SNAT
iRules novice here !!
I have a need to add the real client IP into the HTTP header when using a SNAT rule, but I need to do it dynamically. this is due to the upstream proxy using client IP addresses to determine policy for web browsing. I understand this can be done somehow using iRules and remote_addr or something - only thing is I am not a software type geeza, so programming for me is like coming to terms with 3 heads !!
has anyone done this before and maybe supply some code, or can anyone shed light on what is needed? help oh help !!
- unRuleY_95363Historic F5 AccountThis is actually something a lot of people do...
rule preserve_client_ip { when HTTP_REQUEST { HTTP::header insert ORIG_CLIENT_IP [IP::remote_addr] } }
HTTP::cookie insert ORIG_CLIENT_IP [IP::remote_addr]
- rapmaster_c_127Historic F5 AccountAnd if you want a standards-based X-Forwarded-For trace header, you can do this without an iRule:
b profile http http insert xforwarded for enable
- Brian_Ott_11267
Nimbostratus
Netscaler provides an ISAPI filter on the server side which allows the IIS logs to recognize the true customer's ip address rather than the load balanced one. Is there anything similar that F5 offers? Can one do this with irules? - Nick_Johnston_2
Nimbostratus
Hi- - unRuleY_95363Historic F5 AccountI'm not sure why you think you need FastHTTP. Generally, FastHTTP is a less complex, lightweight HTTP processing engine that runs a lot faster, but without the flexibility afforded by using the full HTTP proxy.
- Nick_Johnston_2
Nimbostratus
Jan 19 11:41:13 deathstar mcpd[714]: 01070394:3: HTTP::header in rule (myIrule) requires an associated FASTHTTP profile on the virtual server (FCECO). - unRuleY_95363Historic F5 AccountOk, this error is very misleading and I have created a bug entry for us
- unRuleY_95363Historic F5 AccountBrian,
- Brian_Ott_11267
Nimbostratus
Thank you for your reply. I had thought of talking to Netscaler about finding out what they use in the header, but there are issues with trying to do that. - unRuleY_95363Historic F5 AccountYes, that would be true. Without SNAT the original client IP is preserved as the source of the packet.
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