Inhaltsverzeichnis
Password
Administrator Username
Endpoints
Removing endpoints
Choosing non-standard ports
Securing the endpoint to your location:
Heim Datenbank MySQL-Tutorial 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)
Nach dem Login kopieren

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
Nach dem Login kopieren

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
Nach dem Login kopieren

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
Nach dem Login kopieren

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
Nach dem Login kopieren

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
Nach dem Login kopieren

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

Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn

Heiße KI -Werkzeuge

Undresser.AI Undress

Undresser.AI Undress

KI-gestützte App zum Erstellen realistischer Aktfotos

AI Clothes Remover

AI Clothes Remover

Online-KI-Tool zum Entfernen von Kleidung aus Fotos.

Undress AI Tool

Undress AI Tool

Ausziehbilder kostenlos

Clothoff.io

Clothoff.io

KI-Kleiderentferner

AI Hentai Generator

AI Hentai Generator

Erstellen Sie kostenlos Ai Hentai.

Heiße Werkzeuge

Notepad++7.3.1

Notepad++7.3.1

Einfach zu bedienender und kostenloser Code-Editor

SublimeText3 chinesische Version

SublimeText3 chinesische Version

Chinesische Version, sehr einfach zu bedienen

Senden Sie Studio 13.0.1

Senden Sie Studio 13.0.1

Leistungsstarke integrierte PHP-Entwicklungsumgebung

Dreamweaver CS6

Dreamweaver CS6

Visuelle Webentwicklungstools

SublimeText3 Mac-Version

SublimeText3 Mac-Version

Codebearbeitungssoftware auf Gottesniveau (SublimeText3)

So sortieren Sie den MongoDB -Index So sortieren Sie den MongoDB -Index Apr 12, 2025 am 08:45 AM

Sortierindex ist eine Art von MongoDB -Index, mit dem die Sortierung von Dokumenten in einer Sammlung nach bestimmten Feldern sortiert werden kann. Durch das Erstellen eines Sortierindex können Sie die Ergebnisse der Abfrageergebnisse ohne zusätzliche Sortiervorgänge schnell sortieren. Zu den Vorteilen gehören schneller Sortieren, Überschreibungsanfragen und On-Demand-Sortieren. Die Syntax ist db.collection.createinNex ({field: & lt; sortieren order & gt;}), wobei & lt; sortieren order & gt; ist 1 (aufsteigende Ordnung) oder -1 (absteigende Reihenfolge). Sie können auch Multi-Field-Sortierindizes erstellen, in denen mehrere Felder sortiert werden.

Was ist die CentOS MongoDB -Backup -Strategie? Was ist die CentOS MongoDB -Backup -Strategie? Apr 14, 2025 pm 04:51 PM

Detaillierte Erläuterung der effizienten Backup -Strategie von MongoDB im CentOS -System Dieser Artikel wird die verschiedenen Strategien zur Implementierung der MongoDB -Sicherung im CentOS -System ausführlich einführen, um die Datensicherheit und die Geschäftsübergang zu gewährleisten. Wir werden manuelle Backups, zeitgesteuerte Sicherungen, automatisierte Skriptsicherungen und Sicherungsmethoden in Docker -Containerumgebungen abdecken und Best Practices für die Verwaltung von Sicherungsdateien bereitstellen. Handbuch Sicherung: Verwenden Sie den Befehl mongodump, um eine manuelle vollständige Sicherung durchzuführen.

So setzen Sie den Befehl mongoDB So setzen Sie den Befehl mongoDB Apr 12, 2025 am 09:24 AM

Um eine MongoDB -Datenbank einzurichten, können Sie die Befehlszeile (Verwendung und db.CreateCollection ()) oder die Mongo -Shell (Mongo, Verwendung und DB.CreateCollection ()) verwenden. Weitere Einstellungsoptionen umfassen das Anzeigen von Datenbank (anzeigen DBS), Ansichtskollektionen (Sammlungen anzeigen), das Löschen von Datenbank (db.dropdatabase ()), das Löschen von Sammlungen (db. & Amp; lt; Collection_Name & amp;

So verschlüsseln Sie Daten in Debian MongoDB So verschlüsseln Sie Daten in Debian MongoDB Apr 12, 2025 pm 08:03 PM

Verschlüsseln Sie die MongoDB -Datenbank in einem Debian -System erfordert die folgenden Schritte: Schritt 1: Stellen Sie zuerst die MongoDB -Installation durch, dass Ihr Debian -System MongoDB installiert hat. Wenn nicht, lesen Sie bitte das offizielle MongoDB-Dokument für die Installation: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-debian/step 2: Generieren Sie die Verschlüsselungsschlüsseldatei Erstellen Sie eine Datei, die die Verschlüsselungsschlüssel enthält, und setzen

Die Kraft von MongoDB: Datenmanagement in der modernen Zeit Die Kraft von MongoDB: Datenmanagement in der modernen Zeit Apr 13, 2025 am 12:04 AM

MongoDB ist eine NOSQL -Datenbank, da ihre Flexibilität und Skalierbarkeit im modernen Datenmanagement sehr wichtig sind. Es verwendet Dokumentenspeicher, eignet sich für die Verarbeitung von groß angelegten, variablen Daten und bietet leistungsstarke Abfragen und Indizierungsfunktionen.

Was tun, wenn es keine Transaktion in MongoDB gibt Was tun, wenn es keine Transaktion in MongoDB gibt Apr 12, 2025 am 08:57 AM

In mongoDB fehlt Transaktionsmechanismen, wodurch die Atomizität, Konsistenz, Isolierung und Haltbarkeit von Datenbankoperationen nicht garantiert werden kann. Alternative Lösungen umfassen Überprüfungs- und Verriegelungsmechanismen, verteilte Transaktionskoordinatoren und Transaktionsmotoren. Bei der Auswahl einer alternativen Lösung sollten ihre Komplexität, Leistung und Datenkonsistenzanforderungen berücksichtigt werden.

So wählen Sie eine Gitlab -Datenbank in CentOS aus So wählen Sie eine Gitlab -Datenbank in CentOS aus Apr 14, 2025 pm 05:39 PM

Bei der Installation und Konfiguration von GitLab in einem CentOS -System ist die Auswahl der Datenbank von entscheidender Bedeutung. GitLab ist mit mehreren Datenbanken kompatibel, aber PostgreSQL und MySQL (oder MariADB) werden am häufigsten verwendet. Dieser Artikel analysiert Datenbankauswahlfaktoren und enthält detaillierte Installations- und Konfigurationsschritte. Datenbankauswahlhandbuch Bei der Auswahl einer Datenbank müssen Sie die folgenden Faktoren berücksichtigen: PostgreSQL: Die Standarddatenbank von GitLab ist leistungsstark, hat eine hohe Skalierbarkeit, unterstützt komplexe Abfragen und Transaktionsverarbeitung und ist für große Anwendungsszenarien geeignet. MySQL/Mariadb: Eine beliebte relationale Datenbank, die in Webanwendungen häufig verwendet wird, mit einer stabilen und zuverlässigen Leistung. MongoDB: NoSQL -Datenbank, spezialisiert auf

Kann gegen Code in Windows 8 ausgeführt werden Kann gegen Code in Windows 8 ausgeführt werden Apr 15, 2025 pm 07:24 PM

VS -Code kann unter Windows 8 ausgeführt werden, aber die Erfahrung ist möglicherweise nicht großartig. Stellen Sie zunächst sicher, dass das System auf den neuesten Patch aktualisiert wurde, und laden Sie dann das VS -Code -Installationspaket herunter, das der Systemarchitektur entspricht und sie wie aufgefordert installiert. Beachten Sie nach der Installation, dass einige Erweiterungen möglicherweise mit Windows 8 nicht kompatibel sind und nach alternativen Erweiterungen suchen oder neuere Windows -Systeme in einer virtuellen Maschine verwenden müssen. Installieren Sie die erforderlichen Erweiterungen, um zu überprüfen, ob sie ordnungsgemäß funktionieren. Obwohl VS -Code unter Windows 8 möglich ist, wird empfohlen, auf ein neueres Windows -System zu upgraden, um eine bessere Entwicklungserfahrung und Sicherheit zu erzielen.

See all articles