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
1
vote
2 answers

Azure API Management behind a Front Door

I hope somebody can help me to understand this issue and hopefully to solve it. I have an api management service in my subscription, and I wanted to try to protect it by using an Azure Front Door in front of it. So to achieve this I create an API…
1
vote
1 answer

How to block internet for everyone except for one single IP in Azure VM

I have a requirement on Azure VM wherein I want to block internet access to all the IP's except for 1 single IP(which would be mine). I'm able to block internet access for everyone by creating a Deny OutBound rule for everyone. However, when I'm…
Sammy
  • 107
  • 6
1
vote
1 answer

How to create an Azure Network Security Group Flow log with Azure PowerShell

I want to create a NSG flow log for the network security group of a given Virtual Machine and link to a given Storage Account with PowerShell. How can I achieve this?
1
vote
2 answers

All network port restricted on network security group which have dev Tag

I am creating the custom policy with my requirements, I want the definition policy in which "All network port should be restricted on Network Security Group which has Tag of dev only". ERROR: Failed to parse policy rule: 'Could not find member…
1
vote
0 answers

How can I whitelist only specific IPs for DNS in Azure using NSG rules?

I'd like to configure an NSG to whitelist port 53 to my internal DNS server, as well as Azure's platform DNS at 168.63.129.16, but block all other outbound DNS connections. I've found discussions (no official documentation) saying that DNS traffic…
jsmartt
  • 1,404
  • 1
  • 15
  • 22
1
vote
1 answer

Azure NSG Private IP Congfiguration (WhiteList)Vnet to Vnet communication

I have situation where I want to open my Vnet(lets say Vnet1) for other Vnets (which has private IP range defined ) , I am thinking to use NSG rules and allow private IP ranges of other Vnets (lets say Vnet2 , Vnet3) to this entry point Subnet(in…
xslguy
  • 91
  • 1
  • 11
1
vote
1 answer

How to delete an element of cartesian product of a two lists in Terraform?

I would like to create a set of network security (nsg) rules in Azure between different subnets by using Terraform. For that purpose, i have written the below code: #here, a set of subnets are created according to the value of count. resource…
MoonHorse
  • 1,966
  • 2
  • 24
  • 46
1
vote
1 answer

Optimize Powershell script for Azure NSG

I have a script for finding all inbound, allow rules in Azure NSG which source is any. It is doing his job but it takes just an enormous amount of time to iterate every rule in every available NSG in Azure. Question is there is any way to optimize…
Oleh Tarasenko
  • 601
  • 5
  • 17
1
vote
1 answer

ADF Access to ADLS Gen2 within VNet

I'm looking for some assistance in configuring an ADLS Gen2 which has the firewall enabled and is joined to a VNet so that I can connect to it from ADF. If I add the IP addresses for the Azure IR to the storage firewall, without the adding the VNet,…
1
vote
2 answers

Azure Advisory: Web ports should be restricted on NSG associated to your VM

What can I do to fix this Advisory message? The VM this relates to is a webserver, which sits behind an Azure LoadBalancer. The NSG rule that is causing this (only 1 'not default rule' ) is: Type: Allow Source: Service Tag - Internet, source port…
Paul0515
  • 23,515
  • 9
  • 32
  • 47
1
vote
1 answer

How do I prevent local users from downloading data from Azure virtual machine to outside

I am building a system in Azure such that the users should not be able to transfer data from Azure virtual machine to outside world. But the administrator should be able to do it. I am aware that this can be controlled via Azure NSG, but this…
Manjunath Rao
  • 1,397
  • 4
  • 26
  • 42
1
vote
1 answer

Back up Mechanism for Azure NSG

I'm working on backing up the Azure Network Security for Azure Stack. I have used Azure Powershell and using that module I am able to export the existing config in a CSV and re deploy the stuff using CSV exported. My question would this module…
Manpreet
  • 119
  • 2
  • 8
1
vote
1 answer

Is using NSG on AKS advanced networking subnet supported and what are the ports needed to be open between nodes and master?

What port for TCP/UDP communication needs to be open between the nodes and the master of azure kubernetes services, when the nodes are in a subnet that uses advanced networking? For security reasons we have to use a Network Security Group on every…
1
vote
1 answer

NSG and routing details to connect a Microsoft Flow with Azure SQL database in a VNET

I have a SQL Server DB in a VM in a VNET in an Azure Subscription . Currently it does not have any connection open to the Internet . My application team has designed a Microsoft Flow application that will read some emails , parse them in some way…
1
vote
1 answer

A new Azure network security group not working

I've got an Azure service fabric setup and I'd like the back end services to be able to make calls to an external API. To this end I have created a Network Security Group instance and set the subnet to be that of the backend subnet of the service…
Slicc
  • 3,217
  • 7
  • 35
  • 70