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
0 answers

Not able to establish DB connectivity to hive DB which is hosted in Azure from local

We have a HdInsight cluster in Azure which is inside a VNet with NSG attached to it. I am trying to connect to Hive DB from DBeaver App. I am getting "Connection reset" error. Also when I tried connecting from Java application, getting the same…
Manopriya
  • 15
  • 1
  • 6
0
votes
2 answers

How to run a Azure Powershell cmdlets on a VM when outbound Internet access is restricted

I am using Powershell script that resides in a VM to retrieve the list of resources in a subscription. Currently I have the outbound internet enabled on the NSG of the VM. But I would like to restrict the outbound internet access in future. Is there…
user2219441
  • 153
  • 1
  • 1
  • 7
0
votes
2 answers

How to whitelist source IPs on Azure VMs fronted by Azure Load Balancer

I have a public facing, standard sku, Azure Load Balancer that forwards the incoming requests for a certain port to a virtual machine, using load balancing rules. This virtual machine has a NSG defined at the subnet level, that allows incoming…
Sid
  • 13
  • 1
  • 1
  • 4
0
votes
1 answer

How to restrict internet access to a subnet, and allow from only another subnet of the same vnet?

How to restrict inbound internet traffic to a Subnet1 and allow traffic to it from Subnet2 of the same vnet? And enable inbound internet traffic to Subnet2. How to do it in Azure? +-----------------------------------+ …
Michael Chudinov
  • 2,620
  • 28
  • 43
0
votes
1 answer

Azure - How do I create a dashboard graph to monitor traffic from an on-prem source IP?

I have a dashboard with my Azure VMs. I have metrics graphs to show the inbound network activity to those VMS. I would like a graph that shows the inbound traffic to a specific VM from a specific set of on-prem IPs. I would have thought that this…
0
votes
2 answers

Azure NSG rules exposed to internet

I am creating one PS script which fetch all ports that are allowed to internet in Azure NSG, here problem is i want to get by port number in the below script i am able to fetch only one port but how to fetch for multiple ports. Currently i am…
Dev Reddy
  • 29
  • 1
  • 7
0
votes
1 answer

Can I use Azure Network Security Group to Allow Access to Database VM only from Web Apps?

I would like to close MySQL port on the VM to all connections except from Web Apps. Can this be done? The settings below do close MySQL port, yet don't allow Web Apps to connect.
0
votes
1 answer

How do I secure (SSRS ) reporting service instance when it is installed in same virtual machine as database?

I am working on architecture where web application will talk to database. The web application is in VM1 The database is on VM2 as shown below I am following below security best practises, VM 1 can accept traffic from any source. The protocol…
kudlatiger
  • 3,028
  • 8
  • 48
  • 98
0
votes
1 answer

Inbound and Outbound Rules Confusion Azure

I am using same NSG for two subnets in a VM. Now i have created a Custom rule where VM1 cannot accept packets from VM2. But default NSG rule allows VM2 to send packets to VM1. Here are the pictures - Vm2 to Vm1 outbound default rule created by…
0
votes
1 answer

Disable Network Level Security on my Azure Virtual machine remotely

Whenever I try to login in my Server I get following error The remote computer that you are trying to connect to requires Network Level Authentication (NLA), but your Windows domain controller cannot be contacted to perform NLA. If you are an…
shalu
  • 3
  • 1
  • 1
  • 2
0
votes
1 answer

Azure Policy to Audit NSG rule sourceAddressPrefix

In Azure I have an NSG Rule configured as follows: Im trying to write an Azure Policy, to audit if the Source IP addresses/CIDR ranges is not set correctly. The value should always be exactly equal to: 192.168.0.0/24,192.168.1.0/24. If it is not…
Jeffrey
  • 2,095
  • 3
  • 20
  • 36
0
votes
1 answer

I want to fetch logs like activity, key-vault,nsg flow log from azure monitor with the help of java program and send them to an tcp/http endpoint

I want to get the real time log data from azure monitor but unable to find the structure and api in java for this. The program will run as cron and pull the different logs from azure monitor. what will be the structure/api's for this.
Sherlock21
  • 3
  • 1
  • 3
0
votes
1 answer

Azure Subnet-to-Subnet Security Rules without Application Security Groups

I'm trying to understand the Network Security Groups and Application Security Groups. What I'm trying to achieve is I have a basic set up as below. In my vnet, I have 2 subnets which are front-end and back-end and I have 2 NSGs that each subnet is…
Melih
  • 323
  • 3
  • 11
0
votes
1 answer

Does Azure charge for incoming traffic which is blocked by Network Security Group (NSG) firewall rules?

Azure charges for incoming traffic to the instance. However, does Azure also charge for incoming traffic which is blocked by relevant Network Security Group (NSG) firewall rules, which does not reach the instance?
Todd Booth
  • 267
  • 1
  • 3
  • 12
0
votes
1 answer

Auto enable network watcher resource while deploying NSG flow log using ARM template

As per this announcement, the support for NSG flow logs creation using ARM template is now released and hence was trying the quick-start ARM template which can do the same, however it appears that there is a pre-requisite that needs to be there…