Block Ping request to Azure Web Apps

Rituparna Bhattacharya 20 Reputation points
2024-09-25T05:32:30.95+00:00

I have created an Azure Web App and enabled VNET Integration for that. I can able to ping the Web App with default DNS. I want to restrict ICMP Ping request for this Web App. I have assigned a NSG with Subnet but still I can able t ping the App Service. Below is my NSG settings. Is there anyway to block ICMP for Web Apps?
Screenshot 2024-09-25 110050

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,660 questions
{count} votes

Accepted answer
  1. Ben Gimblett 4,555 Reputation points Microsoft Employee
    2024-09-25T10:13:57.6+00:00

    Hi thanks for the question

    There's a couple of concepts to be aware of with Web Apps

    You can VNET integrate BUT this is for outbound traffic from the web app. For example you deploy a web app and want the code to depend on a service which is private on your network. By enabling VNET integration you can do that. However, VNET integration is one way (outbound flows only). So if you have an NSG on the subnet you integrate with the rules would work only for "outbound".

    If you want private access INTO your web app you would need to deploy a private endpoint now you can deploy an NSG with inbound rules. If you dont want any comms on the Public endpoint you should use the "access restrictions" in the network setting to "disable" the public endpoint

    Now all that said, you should be able to block ICMP on the private endpoint if your client DNS is resolving to the private ip, but I am unsure if you can block ICMP on the public endpoint (even if you turn off the data plane traffic as described above)
    I'll have a look, but I suspect not. The reason for this would be because inbound traffic to app service traverses multi-tenant reverse proxies which listen on a public path which is shared (all customers of the underlying hosting stamp would use the same public inbound IPs as per the IPs listed in the web app properties)


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.