2

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 ?

driis
  • 161,458
  • 45
  • 265
  • 341

3 Answers3

4

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/

Koen Zomers
  • 4,236
  • 1
  • 22
  • 14
1

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).

astaykov
  • 30,768
  • 3
  • 70
  • 86
  • 2
    I hope this is added soon. Seems like a huge security hole for redis if hosted in VM on linux. If not would be nice to know how to secure redis properly in a linux vm where a Azure Website is connecting to it. – thames Oct 31 '13 at 23:32
  • the only possible way today is to use Azure Cloud Service (Web Role/worker Role) to securely connect to an Azure VM via Azure VNet. – astaykov Nov 01 '13 at 08:38
  • I also have a postgres db running in Linux that would need to be secured. So that would only work for redis. Seems like a huge security hole. We also have more complexity in that our Azure Websites auto scale meaning adding or removing (scale down) of ip's. How does that change firewall rules automatically? – thames Nov 01 '13 at 19:32
  • you will not have this issue if you use Web Roles and VNet! Or wait until (if ever) Web Sites come to suppot VNet. So there is a **secure** solution **today**, which means there is no security hole. – astaykov Nov 01 '13 at 20:45
-3

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