We have a cluster of VM in azure exposing some internal API's. To do more secure we are using Application Gateway to have ssl offload. But also we would like to restrict the external IP's that can access to this API's. Is there a way to allow only a range of IP's to connect through and Application Gateway?
Thanks.
I will add, for those seeing this question in 2020, that the port range is different for the V1 sku compared to V2 application gateway sku.
If you wish to add a Network Security Group to the subnet which your application gateway resides, you'll need to permit all inbound traffic for the following port ranges:
V1: 65503-65534
V2: 65200-65535
For reference, the Azure Portal will throw the following error if you attempt to assign a NSG to the application gateway subnet, without first permitting the required port ranges (my details have been removed).
Failed to save subnet 'xxxxxxxxxx'. Error: 'Network security group xxxxxxxxxx/providers/Microsoft.Network/networkSecurityGroups/'. xxxxxxxxxx blocks incoming internet traffic on ports 65200 - 65535 to subnet /subscriptions/xxxxxxxxxx/resourceGroups/xxxxxxxxxx/providers/Microsoft.Network/virtualNetworks/xxxxxxxxxx/subnets/xxxxxxxxxx, associated with Application Gateway /subscriptions/xxxxxxxxxx/resourceGroups/xxxxxxxxxx/providers/Microsoft.Network/applicationGateways/xxxxxxxxxx. This is not permitted for Application Gateways that have V2 Sku.'
General instructions:
80
and 443
, which are standard HTTP and HTTPS traffic ports. This of course, should match whatever rule/listener configuration you have on your application gateway.I'll further call attention to a couple tips that might help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With