Question

We have a couple of web services built with service stack and deployed as self-hosted executables to several Windows Azure servers. This setup was migrated from Amazon EC2.

The problem we're facing is that the services make heavy use of ip address geo-resolution (i.e map IP address to country / region). However under the Azure setup, all requests appear to originate from the server's own external IP, which is a LAN IP.

For example if the Virtual Machine's ip address is 10.0.0.4, all HTTP appears to originate from 10.0.0.4.

There are tons of settings and features which use different terminology to Amazon. We've tried looking into several things (such as direct server return), but so far we've come up short.

What is the correct way to achieve the simplest "port forwarding" such that the service port is directly open and requests appear to originate from their actual origin?

Was it helpful?

Solution

I've un-deleted the question and answering it because it turns out it is a small ServiceStack gotcha after all, and might help someone else in the future:

Don't use UserHostAddress, use RemoteIp instead.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top