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
- Removing the ports when not required
- Choosing non-standard ports
- 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.
原文地址:Securing MongoDB on Windows Azure, 感谢原作者分享。

MySQL Index Cardinality는 쿼리 성능에 중대한 영향을 미칩니다. 1. 높은 카디널리티 인덱스는 데이터 범위를보다 효과적으로 좁히고 쿼리 효율성을 향상시킬 수 있습니다. 2. 낮은 카디널리티 인덱스는 전체 테이블 스캔으로 이어질 수 있으며 쿼리 성능을 줄일 수 있습니다. 3. 관절 지수에서는 쿼리를 최적화하기 위해 높은 카디널리티 시퀀스를 앞에 놓아야합니다.

MySQL 학습 경로에는 기본 지식, 핵심 개념, 사용 예제 및 최적화 기술이 포함됩니다. 1) 테이블, 행, 열 및 SQL 쿼리와 같은 기본 개념을 이해합니다. 2) MySQL의 정의, 작업 원칙 및 장점을 배우십시오. 3) 인덱스 및 저장 절차와 같은 기본 CRUD 작업 및 고급 사용량을 마스터합니다. 4) 인덱스의 합리적 사용 및 최적화 쿼리와 같은 일반적인 오류 디버깅 및 성능 최적화 제안에 익숙합니다. 이 단계를 통해 MySQL의 사용 및 최적화를 완전히 파악할 수 있습니다.

MySQL의 실제 응용 프로그램에는 기본 데이터베이스 설계 및 복잡한 쿼리 최적화가 포함됩니다. 1) 기본 사용 : 사용자 정보 삽입, 쿼리, 업데이트 및 삭제와 같은 사용자 데이터를 저장하고 관리하는 데 사용됩니다. 2) 고급 사용 : 전자 상거래 플랫폼의 주문 및 재고 관리와 같은 복잡한 비즈니스 로직을 처리합니다. 3) 성능 최적화 : 인덱스, 파티션 테이블 및 쿼리 캐시를 사용하여 합리적으로 성능을 향상시킵니다.

MySQL의 SQL 명령은 DDL, DML, DQL 및 DCL과 같은 범주로 나눌 수 있으며 데이터베이스 및 테이블을 작성, 수정, 삭제, 삽입, 업데이트, 데이터 삭제 및 복잡한 쿼리 작업을 수행하는 데 사용됩니다. 1. 기본 사용에는 CreateTable 생성 테이블, InsertInto 삽입 데이터 및 쿼리 데이터 선택이 포함됩니다. 2. 고급 사용에는 테이블 조인, 하위 쿼리 및 데이터 집계에 대한 GroupBy 조인이 포함됩니다. 3. 구문 검사, 데이터 유형 변환 및 권한 관리를 통해 구문 오류, 데이터 유형 불일치 및 권한 문제와 같은 일반적인 오류를 디버깅 할 수 있습니다. 4. 성능 최적화 제안에는 인덱스 사용, 전체 테이블 스캔 피하기, 조인 작업 최적화 및 트랜잭션을 사용하여 데이터 일관성을 보장하는 것이 포함됩니다.

Innodb는 잠금 장치 및 MVCC를 통한 Undolog, 일관성 및 분리를 통해 원자력을 달성하고, Redolog를 통한 지속성을 달성합니다. 1) 원자력 : Undolog를 사용하여 원래 데이터를 기록하여 트랜잭션을 롤백 할 수 있는지 확인하십시오. 2) 일관성 : 행 수준 잠금 및 MVCC를 통한 데이터 일관성을 보장합니다. 3) 격리 : 다중 격리 수준을지지하고 반복적 인 방사선이 기본적으로 사용됩니다. 4) 지속성 : Redolog를 사용하여 수정을 기록하여 데이터가 오랫동안 저장되도록하십시오.

데이터베이스 및 프로그래밍에서 MySQL의 위치는 매우 중요합니다. 다양한 응용 프로그램 시나리오에서 널리 사용되는 오픈 소스 관계형 데이터베이스 관리 시스템입니다. 1) MySQL은 웹, 모바일 및 엔터프라이즈 레벨 시스템을 지원하는 효율적인 데이터 저장, 조직 및 검색 기능을 제공합니다. 2) 클라이언트 서버 아키텍처를 사용하고 여러 스토리지 엔진 및 인덱스 최적화를 지원합니다. 3) 기본 사용에는 테이블 작성 및 데이터 삽입이 포함되며 고급 사용에는 다중 테이블 조인 및 복잡한 쿼리가 포함됩니다. 4) SQL 구문 오류 및 성능 문제와 같은 자주 묻는 질문은 설명 명령 및 느린 쿼리 로그를 통해 디버깅 할 수 있습니다. 5) 성능 최적화 방법에는 인덱스의 합리적인 사용, 최적화 된 쿼리 및 캐시 사용이 포함됩니다. 모범 사례에는 거래 사용 및 준비된 체계가 포함됩니다

MySQL은 소규모 및 대기업에 적합합니다. 1) 소기업은 고객 정보 저장과 같은 기본 데이터 관리에 MySQL을 사용할 수 있습니다. 2) 대기업은 MySQL을 사용하여 대규모 데이터 및 복잡한 비즈니스 로직을 처리하여 쿼리 성능 및 트랜잭션 처리를 최적화 할 수 있습니다.

InnoDB는 팬텀 읽기를 차세대 점화 메커니즘을 통해 효과적으로 방지합니다. 1) Next-Keylocking은 Row Lock과 Gap Lock을 결합하여 레코드와 간격을 잠그기 위해 새로운 레코드가 삽입되지 않도록합니다. 2) 실제 응용 분야에서 쿼리를 최적화하고 격리 수준을 조정함으로써 잠금 경쟁을 줄이고 동시성 성능을 향상시킬 수 있습니다.


핫 AI 도구

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

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

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

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

인기 기사

뜨거운 도구

SublimeText3 Linux 새 버전
SublimeText3 Linux 최신 버전

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

ZendStudio 13.5.1 맥
강력한 PHP 통합 개발 환경

Eclipse용 SAP NetWeaver 서버 어댑터
Eclipse를 SAP NetWeaver 애플리케이션 서버와 통합합니다.

에디트플러스 중국어 크랙 버전
작은 크기, 구문 강조, 코드 프롬프트 기능을 지원하지 않음
