Forum Discussion
Xylene_UK_11374
Nimbostratus
Jun 29, 2009IIS REMOTE_ADDR
Previously we had opened a case regarding the use of the Request.ServerVariable("REMOTE_ADDR") in ASP code. When we front our ASP sites with the LTM this Server Variable is changed to the a self-ip on the ltm. Since this code reference is pervasive we'd has preferred to not change it, but changing was certainly an option (undesirable nonetheless). However, we have discovered that we have a few vendor packages written in .NET and ASP that also use REMOTE_ADDR, and the issue is that we have no control over their code. We need to get a solution that will essentially substitute the client ip into the header so that it will be consumed by REMOTE_ADDR correctly. I was trying to work with the following iRule but I don't know what header value to change so that REMOTE_ADDR will pick it up.
when HTTP_REQUEST {
HTTP::header replace REMOTE_ADDR [IP::remote_addr]
}
Also, we tried Layer4 Forwarding without any success. I think that the iRule should "fit the bill", but I have no idea what to replace. Is there a list of header values you pass from the LTM that we could look at so we can determine which one contains the self-ip which is subsequently pulled by REMOTE_ADDR?
- hoolio
Cirrostratus
Hi, - Xylene_UK_11374
Nimbostratus
Hi Aaron, - hoolio
Cirrostratus
If you can change the default gateway of the servers to the LTM's floating self IP address on the server VLAN (and no clients access the virtual server from the same VLAN as the servers) you could disable SNAT on the virtual server. If you need to use SNAT, you'd need to change the app to parse the client IP address from a custom HTTP header like the XFF header. - Xylene_UK_11374
Nimbostratus
Hi Aaron, - Xylene_UK_11374
Nimbostratus
We need to utilize Auto Map SNAT so that our traffic can be routed - hoolio
Cirrostratus
Do you have a standalone ASM unit (or units) being load balanced by an LTM unit? If so, I think auto lasthop on the ASM would ensure the response to the client goes back from the ASM to the LTM even if the LTM is not performing SNAT. This assumes the flow is: - Xylene_UK_11374
Nimbostratus
We do indeed have the architecture you mention, but we have our pools - hoolio
Cirrostratus
I don't see how that would work without SNAT on the LTM or on the ASM, as I think the server would need to dynamically update it's routing table based on the state of the ASM unit. Anyone else have ideas? - Xylene_UK_11374
Nimbostratus
Hey, - hoolio
Cirrostratus
If you have a pair of ASM units, I personally don't see the need to fail open direct to the pool. But I don't have all of the details of your implementation and requirements. What would take both ASM units down? Would you also need to account for a similar possibility of both LTM units going down simultaneously? If you're concerned about the ASM processes themselves, I suppose you could configure a non-ASM VIP on the ASM units and add that as a lower priority pool member on the LTMs.
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