RDP 접근 범위가 넓은 Azure NSG

Azure NSG에서 RDP 접근을 승인된 관리 경로로 제한하고 실제 VM의 연결·인증 설정을 함께 확인하세요.

설명

Azure NSG의 인바운드 TCP 3389는 승인된 관리자 주소나 VPN·Azure Bastion 등 실제 RDP 관리 경로로 제한하세요.

잠재적 영향

전체 출발지를 허용하고 VM까지 경로가 있으면 불필요한 로그인 시도가 늘어날 수 있습니다. 호스트 방화벽, 인증과 보안 업데이트도 점검하세요.

해결 방법

먼저 대체 관리 연결을 확보하세요. NIC와 서브넷의 유효 NSG 규칙을 IPv4·IPv6별로 확인하고, 전체 차단보다 먼저 적용할 좁은 허용 규칙에는 더 작은 우선순위 번호를 지정하세요. 승인된 경로와 차단할 경로에서 새 연결을 시험하고 VM 로그를 확인하세요.

예시

두 발췌는 같은 NSG의 규칙만 바꿉니다. NIC 또는 서브넷과의 연결, VM 주소와 라우팅은 별도로 확인하세요.

변경 전

bicep
resource security_group 'Microsoft.Network/networkSecurityGroups@2020-11-01' = {
  name: 'rdp-security-group'
  location: resourceGroup().location
  tags: {}
  properties: {
    securityRules: [
      {
        properties: {
          description: 'access to RDP'
          protocol: 'Tcp'
          sourcePortRange: '*'
          destinationPortRange: '3389'
          sourceAddressPrefix: '*'
          destinationAddressPrefix: '*'
          access: 'Allow'
          priority: 301
          direction: 'Inbound'
        }
        name: 'rdp-rule'
      }
    ]
  }
}

우선순위 301의 Allow는 먼저 일치하는 규칙이 없는 한 모든 출발지의 RDP를 허용합니다.

변경 후

bicep
resource security_group 'Microsoft.Network/networkSecurityGroups@2020-11-01' = {
  name: 'rdp-security-group'
  location: resourceGroup().location
  tags: {}
  properties: {
    securityRules: [
      {
        properties: {
          description: 'access to RDP'
          protocol: 'Tcp'
          sourcePortRange: '*'
          destinationPortRange: '3389'
          sourceAddressPrefix: '*'
          destinationAddressPrefix: '*'
          access: 'Deny'
          priority: 301
          direction: 'Inbound'
        }
        name: 'rdp-rule'
      }
    ]
  }
}

같은 규칙을 Deny로 바꾸면 더 높은 우선순위로 허용하지 않은 새 RDP 연결이 모두 차단됩니다.

참조