Forum Discussion
EBS_Support_258
Nimbostratus
Dec 06, 2007How to use IRule to determine client ip after pass through Proxy
Hi All,
I'm very new to F5 products and thus know only a little about iRules.
I use this irule to load balance my HTTP traffic
(x.x.x.x) is IP for exclusive that will use pool A and others will use pool B
when CLIENT_ACCEPTED {
if { [IP::addr [IP::remote_addr] equals x.x.x.x]}
{
pool Pool_A
}
else {
pool Pool_B
}
}
Later, There is a proxy coming and now exclusive and others have the same IP after pass through proxy.
I try to search this forum and found I have to do something with "X-Forwarded-For" but I don't know exactly what to do.
Could anyone guide me through this ?
Best Regards,
- Patrick_Chang_7Historic F5 AccountX-Forwarded-For is what F5 can add to the headers when it is the proxy. It sounds like you are talking about another device that is acting as a proxy. Check to see if that proxy adds a custom header that you can use to read the IP address. Standard practice is to do so, but the header name is no universal. Many use X-Forwarded-For and many use X-Remote-Addr. If the proxy does not add such a header, you must find something else besides IP address to identify your users.
- EBS_Support_258
Nimbostratus
Posted By pchang on 12/05/2007 10:11 PM
- Nicolas_BerthieHistoric F5 AccountBluecoat proxy can add X-Forwarded-For header that is "de facto" standard header to insert real client IP address. If header inserted is "X-Remote-Addr" you can use this iRule :
- Nicolas_BerthieHistoric F5 AccountIn this case you have to use data group and matchclass function :
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