I have an application which sits on Amazon EC2, behind an Elastic Load Balancer. There is a specific URL on the server, which only a specified list of IP addresses are allowed to post to.
I've added the following to my Web.config:
<location allowOverride="false" path="mysecureurl">
<system.webServer>
<security>
<ipSecurity allowUnlisted="false">
<add allowed="true" ipAddress="111.111.111.111" />
</ipSecurity>
</security>
</system.webServer>
</location>
When I post directly from the allowed IP address, to the IP address of the server, it works correctly.
When I post from the allowed IP address, via the load balancer, it fails (403: FORBIDDEN). I'm assuming that IIS is seeing the internal IP address for my load balancer, not the one for my client.
Is there any way to get this to work?