목차
Password
Administrator Username
Endpoints
Removing endpoints
Choosing non-standard ports
Securing the endpoint to your location:
데이터 베이스 MySQL 튜토리얼 Securing MongoDB on Windows Azure

Securing MongoDB on Windows Azure

Jun 07, 2016 pm 04:31 PM
azure mongodb windows

By Sridhar Nanjesudwaran, Windows Azure lead at 10gen I have used the MongoDB Installer for Windows Azure to deploy my MongoDB instance on a Windows Virtual Machine on Windows Azure. It is not my production environment but I would still li

By Sridhar Nanjesudwaran, Windows Azure lead at 10gen

I have used the MongoDB Installer for Windows Azure to deploy my MongoDB instance on a Windows Virtual Machine on Windows Azure. It is not my production environment but I would still like to secure it. What do I need to do to secure this standalone instance?

Let us take a look at the possible issues and how you would resolve each of them.

  • Password
  • Administrator username
  • Endpoints

Password

We are assuming you have created a strong password for the Administrator user. If not make sure to set a strong password for the Administrator user.

Administrator Username

The user name cannot be specified using the installer. It is always “Administrator”. The background here is that when Azure Virtual Machines were preview, “Administrator” was the only username allowed when creating Windows Virtual Machines. This was recently fixed but the installer has not been modified to allow it. To secure the instance it would be a good idea to change the username. You can change the username by logging onto the instance.

Once you remote desktop to the instance, you can change the username from PowerShell. To change:

$user = Get-WMIObject Win32_UserAccount -Filter "Name='Administrator'"
$username = “”
$user.Rename($username)
로그인 후 복사

You can verify the username changed by logging out of the instance and retrying with Administrator – this should fail. Now retry with the username you just created which should succeed.

Endpoints

By default the installer creates 3 endpoints on the instance. The endpoints are for

  • RDP (starting at 3389)
  • MongoDB (starting at 27017)
  • PowerShell remoting (starting at 5985)

We are going to secure the endpoints by

  1. Removing the ports when not required
  2. Choosing non-standard ports
  3. Securing them to your location

Removing endpoints

Remove the endpoints if they are not necessary. The PowerShell remoting endpoint is only required for the initial setup. It is not necessary unless you explicitly want to continue to use PowerShell remoting to manage the instance. Hence you should remove the endpoint. Also if you want to use PowerShell remoting to manage the instance, it is more secure to add it via an Azure interface such as (CLI, PowerShell or Management portal) when needed.?

To remove the PowerShell remoting endpoint, from a Windows Azure PowerShell console:

# Remove PowerShell remoting endpoints
Get-AzureVM -ServiceName  | Remove-AzureEndpoint -Name endpname-5985-5985 | Update-AzureVM
로그인 후 복사

The default remoting endpoint name is “endpname-5985-5985”. The service name is the same as the dns prefix you specified in the installer to create the instance. Similarly remove the RDP endpoint. Add it when needed as opposed to keeping it open all the time.

Choosing non-standard ports

Only add the RDP endpoint when necessary. When adding ensure you do not use the default port of 3389 for the external load balancer. To create the endpoint for RDP, from a Windows Azure PowerShell console:

# Add RDP endpoints to the single VM
Get-AzureVM -ServiceName “myservice” | Add-AzureEndpoint -Name rdp -LocalPort 3389 -Protocol tcp | Update-AzureVM
로그인 후 복사

The above sets the load balancer port to an arbitrary one from the ephemeral range.

If an RDPendpoint already exists (like the default one created by the installer), you can change the load balancer port to a non standard port from a?Windows Azure PowerShell console by:

# Update RDP endpoint external port
Get-AzureVM -ServiceName “myservice” | Set-AzureEndpoint -Name rdp -LocalPort 3389 -Protocol tcp | Update-AzureVM
로그인 후 복사

To check the external port you can get it from the management portal or use Windows Azure PowerShell:

# Get RDP endpoint external port
Get-AzureVM -ServiceName “myservice” | Get-AzureEndpoint
로그인 후 복사

Securing the endpoint to your location:

Prior to the recent updates to Windows Azure and Windows Azure PowerShell, the only method of securing endpoints are using firewall rules on the actual instance. While this does help secure the instance, it still allows for malicious DoS attacks. With the recent updates, in addition to firewall rules you can secure your endpoints by specifying a set of addresses that can access it (white list). You want to secure the MongoDB endpoints to only allow your MongoDB client/app machines (maybe in addition to administrator machines) to access the machines.

Also if you are enabling the RDPendpoint, secure it by only allowing access by the specified administrator machines. Using a Windows Azure PowerShell:

# Setup the ACL
$acl = New-AzureAclConfig
Set-AzureAclConfig -AddRule Permit -RemoteSubnet “mysubnet” -Order 1 –ACL $acl -Description “Lockdown MongoDB port”
# Update the endpoint with the ACL
Get-AzureVM -ServiceName “myservice” | Set-AzureEndpoint -Name endpname-27017-27017 -PublicPort 27017 -LocalPort 27017 -Protocol tcp –ACL $acl | Update-AzureVM
로그인 후 복사

Mysubnet – is your subnet that you want to allow access specified in the CIDR format.

본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

AI Hentai Generator

AI Hentai Generator

AI Hentai를 무료로 생성하십시오.

인기 기사

R.E.P.O. 에너지 결정과 그들이하는 일 (노란색 크리스탈)
4 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 최고의 그래픽 설정
4 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 아무도들을 수없는 경우 오디오를 수정하는 방법
4 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 채팅 명령 및 사용 방법
4 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌

뜨거운 도구

메모장++7.3.1

메모장++7.3.1

사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전

SublimeText3 중국어 버전

중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기

스튜디오 13.0.1 보내기

강력한 PHP 통합 개발 환경

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구

SublimeText3 Mac 버전

SublimeText3 Mac 버전

신 수준의 코드 편집 소프트웨어(SublimeText3)

MongoDB 인덱스를 정렬하는 방법 MongoDB 인덱스를 정렬하는 방법 Apr 12, 2025 am 08:45 AM

정렬 색인은 특정 필드 별 컬렉션의 문서를 정렬 할 수있는 MongoDB 인덱스 유형입니다. 정렬 색인을 만들면 추가 분류 작업없이 쿼리 결과를 빠르게 정렬 할 수 있습니다. 장점에는 빠른 정렬, 쿼리 재정의 및 주문형 정렬이 포함됩니다. 구문은 db.collection.createIndex ({field : & lt; sort order & gt;}), 여기서 & lt; sort order & gt; 1 (오름차순 순서) 또는 -1 (하강 순서)입니다. 여러 필드를 정렬하는 멀티 필드 분류 인덱스를 만들 수도 있습니다.

MongoDB에 연결하는 방법 MongoDB에 연결하는 방법 Apr 12, 2025 am 09:09 AM

Navicat과 MongoDB에 연결하려면 : Navicat을 설치하고 MongoDB 연결을 만듭니다. 호스트에 서버 주소를 입력하고 포트에 포트 번호를 입력 한 다음 사용자 이름 및 비밀번호에 MongoDB 인증 정보를 입력하십시오. 연결을 테스트하고 저장하십시오. Navicat은 MongoDB 서버에 연결됩니다.

MongoDB 명령을 설정하는 방법 MongoDB 명령을 설정하는 방법 Apr 12, 2025 am 09:24 AM

MongoDB 데이터베이스를 설정하려면 명령 줄 (사용 및 DB.CreateCollection ()) 또는 Mongo Shell (Mongo, 사용 및 DB.CreateCollection ())을 사용할 수 있습니다. 다른 설정 옵션에는 데이터베이스보기 (Show DBS), 컬렉션보기 (Show Collection), 데이터베이스 삭제 (DB.DropDatabase ()), 컬렉션 삭제 (DB. & Amp; LT; Collection_Name & amp; gt; .Drop ()), 삽입 문서 (DB. & Amp; LT; Collecti;

mongodb에 거래가없는 경우해야 할 일 mongodb에 거래가없는 경우해야 할 일 Apr 12, 2025 am 08:57 AM

MongoDB에는 트랜잭션 메커니즘이 부족하여 데이터베이스 작업의 원자력, 일관성, 격리 및 내구성을 보장 할 수 없습니다. 대체 솔루션에는 검증 및 잠금 메커니즘, 분산 트랜잭션 코디네이터 및 트랜잭션 엔진이 포함됩니다. 대체 솔루션을 선택할 때는 복잡성, 성능 및 데이터 일관성 요구 사항을 고려해야합니다.

Mongodb와 Redis의 차이 Mongodb와 Redis의 차이 Apr 12, 2025 am 07:36 AM

MongoDB와 Redis의 주요 차이점은 다음과 같습니다. 데이터 모델 : MongoDB는 문서 모델을 사용하고 Redis는 키 값 쌍을 사용합니다. 데이터 유형 : MongoDB는 복잡한 데이터 구조를 지원하는 반면 Redis는 기본 데이터 유형을 지원합니다. 쿼리 언어 : MongoDB는 SQL과 같은 쿼리 언어를 사용하고 Redis는 독점 명령 세트를 사용합니다. 거래 : MongoDB는 거래를 지원하지만 Redis는 그렇지 않습니다. 목적 : MongoDB는 복잡한 데이터를 저장하고 관련 쿼리를 수행하는 데 적합한 반면 Redis는 캐싱 및 고성능 애플리케이션에 적합합니다. 아키텍처 : MongoDB는 디스크에 데이터를 유지하고 Redis는 기본적으로 저장합니다.

배치로 MongoDB를 삭제하는 방법 배치로 MongoDB를 삭제하는 방법 Apr 12, 2025 am 09:27 AM

MongoDB에서 다음 방법을 사용하여 문서를 삭제할 수 있습니다. 1. 운영자의 $는 삭제할 문서 목록을 지정합니다. 2. 정규 표현식은 기준을 충족하는 문서와 일치합니다. 3. $는 운영자가 지정된 필드로 문서를 삭제합니다. 4. find () 및 remove () 메소드는 먼저 문서를 가져 와서 삭제합니다. 이러한 작업은 거래를 사용할 수 없으며 모든 일치하는 문서를 삭제할 수 있으므로 사용할 때주의하십시오.

MongoDB에서 사용자를 설정하는 방법 MongoDB에서 사용자를 설정하는 방법 Apr 12, 2025 am 08:51 AM

MongoDB 사용자를 설정하려면 다음 단계를 따르십시오. 1. 서버에 연결하고 관리자 사용자를 만듭니다. 2. 사용자에게 액세스 권한을 부여 할 데이터베이스를 작성하십시오. 3. CreateUser 명령을 사용하여 사용자를 생성하고 자신의 역할 및 데이터베이스 액세스 권한을 지정하십시오. 4. GetUsers 명령을 사용하여 생성 된 사용자를 확인하십시오. 5. 선택적으로 다른 컬렉션에 대한 다른 권한을 설정하거나 사용자 권한을 부여합니다.

MongoDB에서 사용자를 만드는 방법 MongoDB에서 사용자를 만드는 방법 Apr 12, 2025 am 09:03 AM

MongoDB 사용자를 만드는 두 가지 방법이 있습니다. MongoDB 쉘 사용 : 사용 명령을 사용하여 관리자 데이터베이스로 전환하십시오. DB.CreateUser 명령을 사용하여 사용자 이름, 암호 및 역할을 지정하여 사용자를 생성하십시오. MongoDB Compass 사용 : "보안"섹션을 확장하고 "사용자"탭을 클릭하십시오. "사용자 추가"버튼을 클릭하고 사용자 이름, 비밀번호를 입력하고 역할을 선택하십시오.

See all articles