September 24th, 2013, 12:46 AM
Redirect HTTP traffic based on source IP
Hi there all,
This is a bit of a follow on from one of my previous posts Client IP In HTTP Header but is a little different than my original post.
Basically the organisation that I am working for has a web server (server 2008 R2 with IIS 7) that accepts incoming HTTPS requests from clients and then forwards the requests to an application server. The application will then forward this traffic to either Server 1 or Server 2 (Remote location) based on originating / source client IP address.
Now the issue that we are having is that the application server is forwarding all traffic to Server 1 due the the source / originating IP being that of the webserver and not of the actual requesting client.
I have investigated the problem as much as I can and can see that this is a common issue. I notice that X_Forwarded_For is referenced quite a bit but we are not using a proxy server for internal traffic and as such I dont think that I can use URL Rewrite to replace X_Forwardrd_For variable with client IP.
Would anyone know what IIS server variables need to be referenced so that the application server can identify source / originating IP address rather than webserver address ? Do I need to make any configuration changes in URL Rewrite in order for the source / originating IP to appear in the HTTPS request ?
Not being overly fluent in IIS configuration I am having some trouble in identifying exactly what approach I should take and what (if anything) needs to be configured in IIS and any information would be greatly appreciated.