Search code examples
azureipazure-web-rolesstaging

Limit Azure staging application to selected IPs


I'm testing an application in the staging slot within a given web role. I don't want the staging application to be accessible to the public and I was wondering if there was anything I could add to the .cscfg file to lock down the application to just a set of known IPs? I had a look around the portal but couldn't see any way to restrict IPs there.

Any thoughts on this?


Solution

  • You can enable the built in IIS IP and Domain Restrictions and then provide a list of IPs in your web.config (which sadly will mean a redeploy if you have to modify them). Here is a link to a blog post where someone did this: http://blog.liamcavanagh.com/2011/10/how-to-block-ip-addresses-in-windows-azure/