Skip to content

az vm/vmss create: --nsg-rule should default to NONE #20896

@jiasli

Description

@jiasli

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions