I understand that in windows azure you can add VMs to a virtual network, but I don't see the option to add a website to a network.
what is the recommended way of securing access to a VM (MongoDb) from an azure website?
I would much prefer have the db behind some sort of firewall rather than traffic going through the public internet.
Edit: the vm will be hosting MongoDb, so using Sql Azure or other MSSql solutions isn't an option.
Next stepsCreate an Azure Key Vault. Generate or upload a certificate to the Key Vault. Create a VM and install the IIS web server. Inject the certificate into the VM and configure IIS with a TLS binding.
A network security group (NSG) in Azure is the way to activate a rule or access control list (ACL), which will allow or deny network traffic to your virtual machine instances in a virtual network. NSGs can be associated with subnets or individual virtual machine instances within that subnet.
IF you are looking to use networking and your own database in Virtual machine, it is best to start with reserved websites. Shared website may not be good idea due to resource limitation and other restrictions.
If your DB is MongoDB, then you have two option:
Have your ASP.NET MVC application running in a Virtual Machine (Windows Server + IIS + your app - IaaS) and have MongoDB is running on other Virtual Machine. If both machines are in same DC, you dont need to fiddle with networking.
Have Azure ASP.NET MVC Web Role (PaaS) and a Virtual Machine have MongoDB is running (IaaS).
In both cases you just need to configure a connection string to connect MongoDB and there is no extra network modification needed to make it work as all machines are inside same DC.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With