Unable to deny traffic via SSH using Azure Application Security Group

Lakpriya Kottahachchi 1 Reputation point
2020-07-29T19:10:27.777+00:00

I am trying to control internet traffic to a vm that is connected to an azure asg. The asg is connected to a nsg that has a set rules. when testing i noted that the vm allows to ssh from any source. am i missing something? here are my nsg rules.

14345-image.png

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,263 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. GitaraniSharma-MSFT 49,011 Reputation points Microsoft Employee
    2020-07-30T08:05:31.873+00:00

    Hello @LakpriyaKottahachchi-4754 ,

    If the Network Interface of your VM is associated to the ASG NSG with block port 22 rule then you should not be able to SSH to this VM from Internet. Could you please browse to the Network Interface of the VM and check the Effective security rules? Sometimes the VM's NIC may still be connected to it's own NSG and not the ASG NSG. Please check and make sure that the effective security rules has the Deny SSH rule in it.

    Kindly let us know if the above helps or you need further assistance on this issue.


    Please don’t forget to "Accept the answer" wherever the information provided helps you, this can be beneficial to other community members.