Context
--nsg-rule from az vm create by default opens port 3389 for RDP on Windows VM and port 22 for SSH on Linux VM to public internet:
> az vm create --help
...
--nsg-rule : NSG rule to create when creating
a new NSG. Defaults to open
ports for allowing RDP on
Windows and allowing SSH on
Linux. NONE represents no NSG
rule. Allowed values: NONE,
RDP, SSH.
This imposes a security risk and will trigger sev 2 IcM. If this behavior is considered insecure Microsoft/Azure internally, it is considered insecure externally for public users.
Proposed solution
--nsg-rule should be default to NONE. User must explicitly specify RDP or SSH.
Context
--nsg-rulefromaz vm createby default opens port3389for RDP on Windows VM and port22for SSH on Linux VM to public internet:This imposes a security risk and will trigger sev 2 IcM. If this behavior is considered insecure Microsoft/Azure internally, it is considered insecure externally for public users.
Proposed solution
--nsg-ruleshould be default toNONE. User must explicitly specifyRDPorSSH.