Deny incoming HTTP requests from certain IPs

Category: azure connectivity

Question

Michael Rovinsky on Mon, 02 Jul 2012 13:16:21


My Azure web role has an abnormal inbound traffic from 2 IP addresses. How can I block them from sending HTTP requests?

Replies

Craig Landis on Mon, 02 Jul 2012 15:21:17


Hi Michael,

Are you using the new Virtual Machines feature, or is it a PaaS web role?

Thanks,

Craig

Michael Rovinsky on Mon, 02 Jul 2012 15:56:01


I'm not sure I can answer your question correctly. I did not find the relevant information in the Azure Management Portal.

Craig Landis on Mon, 02 Jul 2012 16:21:16


Are you using the new HTML management portal with Preview at the top in the middle? Or the silverlight portal?

Thanks,

Craig

Michael Rovinsky on Mon, 02 Jul 2012 16:48:10


I suppose it's the silverlight portal (the URL is https://windows.azure.com).

SeanBarlow on Mon, 02 Jul 2012 17:25:04


This tutorial should help you block the IP's that you want to block

http://msdn.microsoft.com/en-us/library/windowsazure/jj154098.aspx

Michael Rovinsky on Mon, 02 Jul 2012 19:32:44


Thank you very much.

The tutorial may be very useful when there are a few allowed addresses.

Actually I have a few IPs to ban and all the others should be allowed. Is there a method to specify banned IPs only, not the allowed ones?

Arwind - MSFT on Tue, 03 Jul 2012 04:07:52


Hi,

If you set allowed property to "false" and see if the application will block these IP addresses.

BR,

Arwind

chris.clements on Fri, 03 May 2013 15:12:10


Any idea how to implement this with the new "preview" web role?  When I try to follow the instructions linked at: http://msdn.microsoft.com/en-us/library/windowsazure/jj154098.aspx

I can't find options to "Set the properties of this file to Copy Always to ensure that it will be deployed."

If I follow all other steps in my local webmatrix 3 instance, it works exactly as expected, but when I try to deploy it to azure, the ip-blocks are not honored.