Vaibhav Jain
Vaibhav Jain

Reputation: 34427

How to close a port 8010 on Azure App service

I need to close a port 8010 on one of my app service on Azure. Is it possible to configure ports on app service?

Upvotes: 1

Views: 3253

Answers (1)

suziki
suziki

Reputation: 14108

In the App Service shared tenant environment, it is not possible to block specific ports because of the nature of the infrastructure.

But in App Service Environment(ASE), you have full control over inbound and outbound traffic. You can use Network Security Groups to restrict or block specific ports.

An ASE always exists in a virtual network, and more precisely, within a subnet of a virtual network. You can use the security features of virtual networks to control inbound and outbound network communications for your apps.

So, you need to create app service, virtual network. Then deploy app service to virtual network. (The vnet applies asg rules)

follow steps:

1.create a virtual network and make sure it is in the same location with your app service.

2.create a network secure group.(also make sure in the same location, In my side all of location is 'Central US')

enter image description here

3.add security rules of your nsg. Inbound or Outbound.

enter image description here

3.create a subnet in the vnet. Use the network secure group that you create above.

enter image description here

4.deploy your app service to the subnet of virtual network that you create above.

enter image description here

Finally, the app service deploy to the subnet of virtual network and the subnet virtual network use the network secure group which blocks specific ports. So your app service also block specific ports.

Please let me know if you have more problems.

Upvotes: 3

Related Questions