Questions tagged [azure-nsg]

Network Security Groups (NSG) filters network traffic to and from Azure resources in an Azure virtual network. A Network Security Group(NSG) contains security rules that allow or deny inbound network traffic to, or outbound network traffic from, several types of Azure resources. For each rule, there are source and destination, port, and protocol.

A Network Security Groups (NSG) controls the network traffic to and from Azure resources in an Azure virtual network. A Network Security Group(NSG) contains security rules that allow or deny inbound network traffic to, or outbound network traffic from, several types of Azure resources.

Network security group security rules are evaluated by priority using the 5-tuple information (source, source port, destination, destination port, and protocol) to allow or deny the traffic. Each rule is specified with following propertie

  • Priority: A number between 100 and 4096. Rules are processed in priority order, with lower numbers processed before higher numbers, because lower numbers have higher priority. Once traffic matches a rule, processing stops. As a result, any rules that exist with lower priorities (higher numbers) that have the same attributes as rules with higher priorities are not processed.
  • Source or destination: Any, or an individual IP address, classless inter-domain routing (CIDR) block (10.0.0.0/24, for example).
  • Protocol: TCP, UDP, or Any, which includes TCP, UDP, and ICMP. You cannot specify ICMP alone, so if you require ICMP, use Any.
  • Direction: Whether the rule applies to inbound, or outbound traffic.
  • Port/Port Range: You can specify an individual or range of ports. For example, you could specify 80 or 10000-10005. Specifying ranges enables you to create fewer security rules.
  • Action: Allow or deny

By default for any port, NSG allows all traffic from Virtual network to Virtual Network, allows all traffic from AzureLoadBalancer to any host and denies all traffic from any other source to any host.

115 questions
0
votes
1 answer

Azure Container Instance able to run execution scripts via Az CLI from public IP despite VNET only inbound NSG

So I've deployed an Azure Container Instance Group in a private Subnet & VNET where the default inbound rules on the NSG applies. There isn't a public IP allocated (as expected) however, I am still able to leverage Azure CLI to execute scripts with…
theknees
  • 75
  • 1
  • 7
0
votes
1 answer

Allow Web Apps through Network Security Group

We have a few Web Apps that need to access database on VM that behind Network Security Group. How do we allow Web App through Network Security Group?
0
votes
1 answer

How can I programmatically find VMs with unrestricted SSH connection?

I need to get a list of VMs that have unrestricted SSH. I've been browsing the Azure SDK for Python documentation. There is an SshConfiguration class in the compute module, but it only has info about the public keys. There is a different…
0
votes
1 answer

Export NSG rules to a csv file using powershell

I am trying to use powershell to export all Network Security Group (NSG) rules across all subscriptions in Azure. $sub = Get-AzSubscription $sub | foreach-object { $null = $PSItem | Select-AzSubscription $null = Get-AzNetworkSecurityGroup…
Head and toes
  • 659
  • 3
  • 11
  • 29
0
votes
1 answer

Backup azure analysis service on a storage with firewall rules

is it possible to make a backup of an azure analysis service on a storage account which ist protected via firewall rules? I have set the exception “allow trusted Microsoft services to access this storage account”. But If I try to set the backup on…
Kaja
  • 2,962
  • 18
  • 63
  • 99
0
votes
2 answers

Azure Kuberenets Cluster: Could not find a ready tiller pod

I created an aks cluster using az aks create command with kubenet network and 2 nodes. Due to permissions issue in the AD account, the NSG had to be switched off before running the aks create command. After the AKS cluster created successfully, the…
jack
  • 1,488
  • 7
  • 25
  • 44
0
votes
1 answer

Azure - Issues With Port 22 Filtering NSG on my local machine IP

I am primarily an AWS developer, and testing a few things out in Azure. I have spun up a Linux VM with authentication through user/pw and am having trouble SSHing unless I allow all sources in my NSG. In AWS, I would simply create an inbound rule…
Ian
  • 107
  • 3
  • 11
0
votes
2 answers

Why internet inbound rule for Azure app services does not work?

I have configured an Vitualnetwork let us call it "WorkVirtualNetwork" and it has two subnets "API" and "APImanagement".I have created an azure web app service and assigned the "API" subnet to it. I have created a network security group NSG1 and…
user9463688
0
votes
1 answer

How do default NSG rules allow internet queries on VMs?

The default rules of an NSG are as follows. Inbound: +-----------------------------------+----------+--------------------+-------------+-----------------+------------------+----------+--------+ | Name | Priority | …
jarrad_obrien
  • 391
  • 1
  • 4
  • 15
0
votes
1 answer

How to configure Azure Functions to connect to VM behind an NSG

I have a DB hosted on a VM and a NSG setup around the VM. Not I need azure functions to access the VM. How would I configure NSG to allow Azure Functions to access the VM
kumar
  • 8,207
  • 20
  • 85
  • 176
0
votes
1 answer

how to configure data factory to connect to sql server behind NSG

I have a sql server running on a VM which and have configured NSG for the VM. I would like use azure data factory to connect to the database. How do I set an NSG rule to allow data factory to connect to sql server
kumar
  • 8,207
  • 20
  • 85
  • 176
0
votes
2 answers

Azure NSG is that possible

Is it possible to enable NSG to a cloud service for security purpose? I tried creating a Vnet but I cannot add my NSG to the vnet I created, not sure if thats even possible to do.
Hawk
  • 514
  • 1
  • 7
  • 22
0
votes
1 answer

NSG flow logging and accessing

As I researched, Azure NSG flow logs can be stored in three different places. Below I have listed the those destinations and related access methods to them. Destination --> Access Method Storage Account --> by portal/ by powershell/…
iahsp4
  • 21
  • 5
0
votes
0 answers

NSG Flow Logs don't appear in Azure Monitor

I cannot find corresponding NSG flow logs for the action that I manually triggered. NSG Flow Logs are enabled and configured in the Azure portal under Network Watcher -> NSG Flow Logs. Only default rules are used for outbound NSG. Here is what I…
0
votes
2 answers

Do I need to open Azure NSG firewall rule and VM firewall rule at the same time

VM1 needs to talk to VM2 on port 4567 (In Azure). Both VMS are on the same subnet. Can I just create an inbound rule on the NSG attached to both Vms that says open port 4567? Will this work? Or do I also need to log onto both VM's and configure the…
james
  • 617
  • 7
  • 25