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
5
votes
1 answer

Azure Storage Network Security Group

I want to add an Azure storage account to a VNet / Network Security Group but keep receiving an Authorisation Failure message. The error was: 'code: AuthorizationFailure content: _CYCLIC_OBJECT_ message: This request is not authorized to perform…
Lymedo
  • 576
  • 9
  • 21
4
votes
1 answer

Azure Network Security Group Vs Route Tables

Networking newbie here. From the Documentation it feels like both NSG and Routing tables(UDR) are doing the same thing - capable of defining ACLs at multiple levels (Vnet, Subnet,…
Gadam
  • 2,674
  • 8
  • 37
  • 56
3
votes
1 answer

How to correct this error in creating Azure NSG with Terraform?

I am trying to create a NSG in Azure with Terraform. Terraform Version is v0.15.2 with provider version azurerm v2.61.0 Here's the piece of code in my TF file. resource "azurerm_network_security_group" "nsg" { name = "SG" …
Ajinkya Bapat
  • 619
  • 1
  • 10
  • 26
3
votes
1 answer

How to define a inbound security rule in a NSG defining source as an Azure SQL Server

There is an Azure VM with an Oracle DB installed. I need to access that DB using port 1521 from an SSIS package running on an Azure data factory SSIS runtime. The relevant SSIS DB is in an Azure SQL Server. For the time being my nsg rule defined as…
Subash Basnayake
  • 133
  • 2
  • 10
2
votes
0 answers

Automated way to open NodePort range in Network Security Group

I have some pods that have an associated NodePort service that I would like to expose to the world. However, I am not in control of setting the value of the NodePort, so I need to open up the full range of 30000-32767 in Azure's Network Security…
Carl Reid
  • 771
  • 11
  • 23
2
votes
0 answers

Hikari CP - Closed conection by Hikari is still alive in database server

I am using Spring Boot application to connect to remote Postgresql server (9.2) running behind Azure Network Security Group. When I set the hikari properties to default (means maxLifetime as 30 mts),I frequently got Connection Unavailable exception.…
code-geek
  • 441
  • 1
  • 8
  • 22
2
votes
2 answers

How to List Azure Network Security Group from all Subscription using powershell

I am trying to create an PowerShell script to list Azure Network Security Groups and it's rule from all subscription and export it to CSV. Below is my code which list all the NSG Rule…
2
votes
1 answer

What is the equivalent argument field for source, source service tag and destination field in NSG security rules azure using teraform deployment

In the Source and Destination columns, VirtualNetwork, AzureLoadBalancer, and Internet are service tags, rather than IP addresses. How do i create this using terraform? I am trying to create NSG on azure using terraform. While creating nsg security…
mikeknows
  • 105
  • 3
  • 13
2
votes
2 answers

Delete unused, unattached, unassociated resources Azure CLI

I'm trying to list unused, unattached, and unassociated resources inside Azure using Azure CLI. So far, I've got unmanaged disks using the command: unmanagedDiskNames=$(az disk list -g $rgName --query "[?(managedBy==null)].name" -o tsv) I've got…
Yuval Podoksik
  • 508
  • 2
  • 7
  • 23
2
votes
1 answer

Add multiple CIDR to SourceAddressPrefix using powershell to Azure NSG rule

I'm trying to add multiple CIDR to the SourceAddressPrefix when creating a NSG rule in Azure using powershell. I get the error message when running the Set-AzNetworkSecurityGroup so it accepts the value when creating the rule using…
Daniel Björk
  • 2,475
  • 1
  • 19
  • 26
2
votes
1 answer

IP list for Azure DevOps whitelisting

Does anyone know if there is any documentation for the list of IPs I have to whitelist to get callbacks from Azure DevOps? I cannot seem to find any list, not can I find any tag in an Azure NSG to apply.
sargeMonkey
  • 606
  • 1
  • 7
  • 23
2
votes
2 answers

Azure VM, able to RDP even when not assigned to a NSG - ARM Model

I have added a new VM to a Subnet that has no NSG assigned to. I have a NSG where I have added rules to allow 3389 (RDP) port, but I did not associate this NSG to either the Subnet or the VM n/w interface. But still I am able to RDP into it and am…
bitsandbytes
  • 33
  • 1
  • 3
2
votes
1 answer

Opening of the port in Azure

There is a virtual machine with Windows Server 2016 in Azure. The port is open in the operating system's firewall. Also the port is open in the Network Security Group. I used telnet to check the port - the port is closed. Did I miss something?
Mikhail
  • 357
  • 1
  • 3
  • 17
1
vote
0 answers

App service in a VNet ,Nsg returns 403 forbidden error

I am running my backend API's in azure app service. Trying to secure my API's that can only be access from certain resources. When Access the API it gives Error 403 - Forbidden I have done: .Created a VNET and attach Nsg with it .Add all IP's in a…
1
vote
1 answer

Difference between Azure NetworkSecurityGroupEvents and NetworkSecurityGroupFlowEvents?

I am working on setting up logging and monitoring for the azure NSG but there are 2 places NSG logs being generated and not sure the difference between the two and which logs give more useful insight which i can store in storage account for later…
1
2 3 4 5 6 7 8