How to Connect Azure Worker/Web role to Azure Iaas VMs without using public IP's? - azure

We want to run MongoDB and some custom services on Azure Iaas VMs and connect to them with our roles but we do not want to have public IP exposure on the VMs.
If possible what is the best way of doing this?
If not possible is this on the roadmap?
We can add the VM's under the same cloud service and they can communicate happily, the roles are in same deployment so they communicate, but issue between the vm's and roles. We appreciate that the Iaas stuff is still in preview.
Thanks

If you have your Windows Azure Web/Worker Role and Windows Azure Virtual Machine in the same DC you can access them directly using internal IP address using Virtual Networking (Vnet) using internal Endpoints. To achieve it first you would need to create a Virtual Network and then add your Virtual Machine to this VNet. VNet will give your internal IP address and your Web/Worker Role can communicate to this internal IP address.
You can not do mix mode deployment directly from Windows Azure Preview Portal (it is not supported in preview yet) however you can use PowerShell VNet cmdlets to get it configured and working. To need further assistance with VNet team you can contact them directly here.

Related

Unable to access Blob from Azure Virtual Machines

I am unable to access Blob Service from Azure Virtual Machines running in the same region. I have created a storage account and planned to access to selected IP addresses i.e. MY Laptop, My Office PC and My Virtual Machine which is running is Azure. After whitelisting 3 of the IP's I am able to access the Blob Service from MY Laptop and MY Office PC but unable to access the same of Virtual Machine which is running in Azure.
Pl. let me know if anyone is facing similar issues and the resolution. Thanks in Advance.
Check the NSG the VM belongs to and see if you are allowing the VM to communicate outbound, if so check if Azure storage is allowing incoming connections from the network to which the VM is connected to.
Your VM uses the internal network to attempt to access the Storage so adding the public IP won't work and you can't use internal IP's.
The easiest way would be adding the Virtual Network subnet of the VM to the firewall rules and add Azure.Storage as service endpoint to the subnet. If you add the subnet using the Azure Portal the service endpoint will be automatically added as well. Another way would be setting up a private endpoint.

Azure Bastion for Hybrid Cloud Environment

Is there any way to use Azure Bastion to connect to on-prem systems as well as Azure virtual machines?
I have a hybrid cloud environment where some key machines are on-prem and some are Azure VMs. The Azure VNet is extended with a VPN tunnel so the azure VMs can talk to the on-prem machines.
In Googling my question, I was not able to find much...
The official page for Azure Bastion describes it as '''Azure Bastion is provisioned directly in your Virtual Network (VNet) and supports all VMs in your Virtual Network (VNet)'''
This page talks about hybrid envrionments https://blog.ahasayen.com/introducing-azure-bastion/ , saying:
'''You might also have some sort of hybrid connectivity with your on-premises network and when you are outside the office, you use point to site VPN to securely access your VNET, which is the ideal situation.'"
I am aware of Azure Arc which is currently in preview. Would something like that be appropriate to make this work?
My overall questions are:
Am I totally barking up the wrong tree here? Is my understanding off?
Is it possible to use Azure Bastion to access an on-prem server on an extended VNet?
Thanks in advance!
As far as I know, currently, it's not possible to use Azure Bastion to access an on-prem server on an extended VNet. You only could use Azure Bastion to access all the VMs in the VNet which has AzureBastionSubnet. Refer to this blog
Azure Bastion resides on the same virtual network (VNet) as the
servers accessed and only connects to one VNet.
Actually, you can have a private and securely RDP/SSH connection between your on-premise server and Azure VM via a VPN gateway, you just can not RDP/SSH on-premise server via Azure portal. If you need this feature with Azure Bastion, it's welcome to give feedback or upvote these similar feedback1 and feedback2.
Hope this could help you.
This is now possible via the new capabilities introduced in Azure Bastion Standard Tier.
https://learn.microsoft.com/en-us/azure/bastion/connect-ip-address

Can I create virtual machine without virtual network in Azure Resource Manager

I am trying to create virtual machine (VM) in Azure using ARM templates. In classical model of IAAS, we can create a virtual machine without virtual network in cloud service. Similar to classical model i don't want to put VM in virtual network.
Does anyone tried to create vm without virtual network in Azure resource manager.
Thanks in advance.
V2Vms, i.e. Resource manager VMs have a dependency on a network card, which has a dependency on a subnet.
A VNet is used to provide DHCP and Security Group services to the VM. Without it a VM couldn't obtain an IP Address.
It is not possible to create an Azure VM without a vnet, in the same way that it was not possible to create a V1Vm without a cloud service.
For more information see Understanding Resource Manager deployment and classic deployment

Connect Azure Cloud Service in Virtual Network to Azure SQL database

I have an Azure Cloud Service (Worker Role) that needs to connect to my Azure SQL database and also connect to an external database.
In development the external database was on the public Internet and connectivity was not a problem.
However, the solution now needs to be deployed in a production environment and access to the external database is to be restricted by setting up a Virtual Network.
The Cloud Service, when deployed in the Virtual Network, gets an IP from the subnet, but seems to become inaccessible to the outside world, and is not connecting to the Azure SQL database (I also cannot RDP to it).
This seems to be beyond my level of understanding of networking, but I don't see why it should lose access to its neighbours in the Azure environment.
What am I missing? Do I need to get involved with Endpoints? Is the Virtual Network misconfigured?
Thanks in advance.
Your question is quite vague, in terms that it does describe the whole picture in the best possible way. Let me put my answer based on my understanding about your issue.
First of all - Azure virtual Network is Virtual Network. It is designed to enable secure cross-premisses connectivity with Windows Azure Data Center.
When you deploy a proper PaaS Cloud Service (Worker Role / Web Role) in a Virtual Network, the role instances get IP Addresses allocated from the defined DHCP pool (the VNet Definition).
When you deploy any service in an Azure Virtual Network you have to take care of Name Resolution! Meaning that, if you do not provide a proper DNS Server, your cloud instances will not be able to resolve any address. That includes Azure SQL Database servers. More on Name Resolution can be read here.
Next, but not less important - Azure SQL Database servers are not part of, and, as of March'2013, cannot be added to Azure Virtual Network!
The last statement means that in order for your Worker Role to access Azre SQL Database server, you need to provide a proper DNS server in your Azure Virtual Network.
And lastly, when you deploy a PaaS service into a Virtual Network, in order to access it via Remote Desktop need to:
* Properly enable and configure RDP extension. it will anyway create Input Endpoint. But this is the only way to enable RDP on PaaS right now;
* You could probably enable RDP via PowerShell startup script and access RDP via the VPN tunnel for the Virtual Network - say you configured a Site-to-Site or Point-to-site VPN for your Azure VNet.
Check the building cross-premises Virtual Network guide here.

How do I add a website to a virtual network in Windows Azure?

Scenario:
I have a website on Windows Azure. That website needs to connect to a (new) Azure VM.
I have done the following:
Created new Virtual Network on Azure
Added the VM to the Virtual Network, and it does get an IP in the virtual network.
I have configured the appropiate Endpoint for the VM (Public/Private port).
Now, how do I "connect" the Azure website to the same virtual network, such that my .NET code in the website can create a TCP connection to the VM on it's IP on the Virtual Network ?
This is now possible. Be sure to use the NEW Azure Portal. For details, check out:
http://azure.microsoft.com/blog/2014/09/15/azure-websites-virtual-network-integration/
Currently you cannot connect/add Azure Web Site to a Virtual Network. You can only add VMs and Cloud Services to a Virtual Network. However this is a demanded feature and I believe we will see it in the future releases of the Web Sites service (my speculation).
The key here is to create the Virtual Network before the Virtual Machine and then place the VM in the VN during it's creation. The article here gives instructions moving a VM into a VN.
http://blogs.msdn.com/b/walterm/archive/2013/05/29/moving-a-virtual-machine-from-one-virtual-network-to-another.aspx

Resources